LLMS_Abstract_Notification_View::__construct( mixed $notification )
Constructor
Description Description
Parameters Parameters
- $notification
-
(mixed) (Required) Notification id, instance of LLMS_Notification or an object containing at least an 'id'.
Return Return
(void)
Source Source
File: includes/abstracts/llms.abstract.notification.view.php
public function __construct( $notification ) { if ( is_numeric( $notification ) ) { $this->id = $notification; $this->notification = new LLMS_Notification( $notification ); } elseif ( is_a( $notification, 'LLMS_Notification' ) ) { $this->id = $notification->get( 'id' ); $this->notification = $notification; } elseif ( is_object( $notification ) && isset( $notification->id ) ) { $this->id = $notification->id; $this->notification = new LLMS_Notification( $notification->id ); } $this->subscriber = new LLMS_Student( $this->notification->get( 'subscriber' ) ); $this->user = new LLMS_Student( $this->notification->get( 'user_id' ) ); $this->post = llms_get_post( $this->notification->get( 'post_id' ), 'post' ); $this->basic_options = apply_filters( $this->get_filter( 'basic_options' ), $this->basic_options, $this ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | |
3.31.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: