You are here

function _scs_nodes_submit in Simplenews Content Selection 7

Helper function: submit handler

Parameters

$form_state:

2 calls to _scs_nodes_submit()
scs_node_selection_submit in ./scs.module
scs_views_create_newsletter_action_submit in simplenews_content_selection_views/scs_views.module
Get the selected nodes and create a newsletter from it

File

./scs.module, line 378
Select Drupal content to create a newsletter

Code

function _scs_nodes_submit($form_state) {
  uasort($form_state['values']['nodes'], 'drupal_sort_weight');
  $title = !empty($form_state['values']['scs_title']) ? $form_state['values']['scs_title'] : variable_get('scs_default_title', '');
  $toc = !empty($form_state['values']['scs_toc']) ? $form_state['values']['scs_toc'] : 0;

  //TODO Type has to be fixed here
  $type = 'simplenews';
  _scs_create_newsletter($title, array_keys($form_state['values']['nodes']), $toc, $type);
}