You are here

function ccl_actions_form_submit in Custom Contextual Links 8

Same name and namespace in other branches
  1. 7 ccl_actions/ccl_actions.module \ccl_actions_form_submit()

Submit handler for ccl_actions_form().

See also

ccl_actions_form()

File

ccl_actions/ccl_actions.module, line 170
Implementation of core actions for CCL.

Code

function ccl_actions_form_submit($form, &$form_state) {
  $form_state['values']['ccl_type'] = 'action';
  $selected_actions = array_filter($form_state['values']['actions_select']);
  $form_state['values']['ccl_title'] = \Drupal::translation()
    ->formatPlural(count($selected_actions), 'Action %actions', ' Actions %actions', array(
    '%actions' => implode(', ', array_keys($selected_actions)),
  ));
  $form_state['values']['ccl_link'] = '- n/a -';
  module_load_include('inc', 'ccl', 'ccl.admin');
  ccl_add_form_submit($form, $form_state);
}