You are here

public function Notifications_Content_Node_View::set_event in Notifications 7

Set event and view name

Overrides Notifications_Message_Template::set_event

File

notifications_content/notifications_content.inc, line 420
Drupal Notifications Framework - Default class file

Class

Notifications_Content_Node_View
Template for a list of nodes, built with a View

Code

public function set_event($event) {
  parent::set_event($event);

  // View may be set into action parameters, or we may get it from template info
  if ($view_name = $event
    ->get_action_context('view')) {
    $this->view_name = $view_name;
  }
  elseif (isset($this->info['view'])) {
    $this->view_name = $this->info['view'];
  }
  return $this;
}