LLMS_Notifications::get_view( LLMS_Notification $notification )
Retrieve a view instance of a notification
Parameters Parameters
- $notification
-
(LLMS_Notification) (Required) Notification instance.
Return Return
(LLMS_Abstract_Notification_View|false)
Source Source
File: includes/notifications/class.llms.notifications.php
* @return LLMS_Abstract_Notification_View|false */ public function get_view( $notification ) { $trigger = $notification->get( 'trigger_id' ); if ( in_array( $trigger, $this->views, true ) ) { $views = array_flip( $this->views ); $class = $views[ $trigger ]; $view = new $class( $notification ); return $view; } return false;
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | |
3.38.0 | Use strict comparison. |
3.24.0 | Introduced. |