You are here

protected function Notifications_Scheduler_Latest_Posts::prepare_context in Notifications 7

Set action parameters, get field mapping from context

Overrides Notifications_Scheduler_Event::prepare_context

1 call to Notifications_Scheduler_Latest_Posts::prepare_context()
Notifications_Scheduler_New_Posts::prepare_context in notifications_scheduler/notifications_scheduler.inc
Set action parameters, get field mapping from context
1 method overrides Notifications_Scheduler_Latest_Posts::prepare_context()
Notifications_Scheduler_New_Posts::prepare_context in notifications_scheduler/notifications_scheduler.inc
Set action parameters, get field mapping from context

File

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

Class

Notifications_Scheduler_Latest_Posts
Test this schedule class, send latest created nodes

Code

protected function prepare_context() {
  if ($type = $this
    ->get_action_context('node_type')) {
    $this
      ->add_object('node_type', $type);
  }

  // Some hack, try a field with array value ??
  if ($tid = $this
    ->get_action_context('taxonomy_term')) {
    $this
      ->add_object('taxonomy_term', $tid);
  }
}