protected function ContextEditForm::actions in Context 8
Same name and namespace in other branches
- 8.4 modules/context_ui/src/Form/ContextEditForm.php \Drupal\context_ui\Form\ContextEditForm::actions()
Actions function.
Parameters
array $form: Form object.
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
Return value
mixed Return mixed object.
Overrides EntityForm::actions
File
- modules/
context_ui/ src/ Form/ ContextEditForm.php, line 236
Class
Namespace
Drupal\context_ui\FormCode
protected function actions(array $form, FormStateInterface $form_state) {
$element = parent::actions($form, $form_state);
$element['submit'] = [
'#type' => 'submit',
'#dropbutton' => 'save',
'#value' => t('Save and continue'),
'#submit' => [
'::submitForm',
'::save',
],
];
$element['submit_exit'] = [
'#type' => 'submit',
'#dropbutton' => 'save',
'#value' => t('Save and exit'),
'#submit' => [
'::submitForm',
'::save',
'::collection',
],
];
return $element;
}