LLMS_Notifications::get_view( LLMS_Notification $notification )

Retrieve a view instance of a notification


Parameters Parameters

$notification

(LLMS_Notification) (Required) Notification instance.


Top ↑

Return Return

(LLMS_Abstract_Notification_View|false)


Top ↑

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;

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0
3.38.0 Use strict comparison.
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.