LLMS_Abstract_Notification_Controller::get_mock_view( string $type = 'basic', int $subscriber = null, int $user_id = null, int $post_id = null )
Get a fake instance of a view, used for managing options & customization on the admin panel
Description Description
Parameters Parameters
- $type
-
(string) (Optional) notification type
Default value: 'basic'
- $subscriber
-
(int) (Optional) subscriber id
Default value: null
- $user_id
-
(int) (Optional) user id
Default value: null
- $post_id
-
(int) (Optional) post id
Default value: null
Return Return
(obj)
Source Source
File: includes/abstracts/llms.abstract.notification.controller.php
public function get_mock_view( $type = 'basic', $subscriber = null, $user_id = null, $post_id = null ) { $notification = new LLMS_Notification(); $notification->set( 'type', $type ); $notification->set( 'subscriber', $subscriber ? $subscriber : get_current_user_id() ); $notification->set( 'user_id', $user_id ? $user_id : get_current_user_id() ); $notification->set( 'post_id', $post_id ); $notification->set( 'trigger_id', $this->id ); return LLMS()->notifications()->get_view( $notification ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: