Elgg\Notifications\InstantNotificationEvent::__construct PHP Method

__construct() public method

Constructor
public __construct ( ElggData $object = null, string $action = null, ElggEntity $actor = null )
$object ElggData The object of the event (ElggEntity)
$action string The name of the action (default: create)
$actor ElggEntity The entity that caused the event (default: logged in user)
    public function __construct(ElggData $object = null, $action = null, ElggEntity $actor = null)
    {
        $this->object = $object;
        $this->actor = $actor;
        if (!isset($actor)) {
            $this->actor = _elgg_services()->session->getLoggedInUser();
        }
        $this->action = $action ?: self::DEFAULT_ACTION_NAME;
    }