You are here

function Notifications_Scheduler_Latest_Posts::subscription_types in Notifications 7

Get subscription types triggered by this event

File

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

Class

Notifications_Scheduler_Latest_Posts
Test this schedule class, send latest created nodes

Code

function subscription_types() {
  $types = parent::subscription_types();
  $type = $this
    ->get_action_context('node_type');
  $term = $this
    ->get_action_context('taxonomy_term');
  if ($type) {
    $types[] = 'content_type';
  }
  if ($term) {
    $types[] = 'taxonomy_term';
  }
  if ($type && $term) {
    $types[] = 'content_type_term';
  }
  return $types;
}