Elgg\Notifications\Event::getAction PHP Method

getAction() public method

Get the name of the action
public getAction ( ) : string
return string
    public function getAction()
    {
        return $this->action;
    }

Usage Example

Example #1
0
 /**
  * Is someone using the deprecated override
  * 
  * @param \Elgg\Notifications\Event $event Event
  * @return boolean
  */
 protected function existsDeprecatedNotificationOverride(\Elgg\Notifications\Event $event)
 {
     $entity = $event->getObject();
     if (!elgg_instanceof($entity)) {
         return false;
     }
     $params = array('event' => $event->getAction(), 'object_type' => $entity->getType(), 'object' => $entity);
     $hookresult = $this->hooks->trigger('object:notifications', $entity->getType(), $params, false);
     if ($hookresult === true) {
         elgg_deprecated_notice("Using the plugin hook 'object:notifications' has been deprecated by the hook 'send:before', 'notifications'", 1.9);
         return true;
     } else {
         return false;
     }
 }