/** * {@inheritdoc} */ public function validateOptionsForm(&$form, FormStateInterface $form_state) { parent::validateOptionsForm($form, $form_state); $selected_actions = $form_state->getValue(array('options', 'selected_actions')); $form_state->setValue(array('options', 'selected_actions'), array_values(array_filter($selected_actions))); }
/** * {@inheritdoc} */ public function validateOptionsForm(&$form, FormStateInterface $form_state) { parent::validateOptionsForm($form, $form_state); $form_state['values']['options']['selected_actions'] = array_filter($form_state['values']['options']['selected_actions']); }