You are here

function notifications_scheduler_latest_posts_action_form in Notifications 7

Action: Configuration form

File

notifications_scheduler/notifications_scheduler.module, line 176
Notifications scheduler module

Code

function notifications_scheduler_latest_posts_action_form($context) {
  $context += array(
    'event_type' => 'notifications_scheduler_latest_posts',
  );
  $form = notifications_scheduler_new_posts_action_form($context);
  $form['node_number'] = array(
    '#title' => t('Number of items to send'),
    '#type' => 'select',
    '#default_value' => isset($context['node_number']) ? $context['node_number'] : variable_get('default_nodes_main', 10),
    '#options' => drupal_map_assoc(array(
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
      10,
      15,
      20,
      25,
      30,
    )),
  );
  return $form;
}