You are here

protected function Notifications_Scheduler_New_Posts::prepare_context in Notifications 7

Set action parameters, get field mapping from context

We need to find out when this was last executed for which we build a unique key based on parameters and also we must log it somewhere

Overrides Notifications_Scheduler_Latest_Posts::prepare_context

File

notifications_scheduler/notifications_scheduler.inc, line 256
Drupal Notifications Framework - Default class file

Class

Notifications_Scheduler_New_Posts
Send new content posted since last notification.

Code

protected function prepare_context() {
  parent::prepare_context();
  $this->action = 'new_posts';
  foreach ($this
    ->get_objects() as $object) {
    $this->action .= ':' . $object
      ->index();
  }

  // Our action could look like new_posts:type:story:term:25
}