protected function ItemForm::actionsElement in Business Rules 8
Same name and namespace in other branches
- 2.x src/Form/ItemForm.php \Drupal\business_rules\Form\ItemForm::actionsElement()
Returns the action form element for the current entity form.
Overrides EntityForm::actionsElement
File
- src/
Form/ ItemForm.php, line 362
Class
- ItemForm
- Base class for Business rules item.
Namespace
Drupal\business_rules\FormCode
protected function actionsElement(array $form, FormStateInterface $form_state) {
$actions = parent::actionsElement($form, $form_state);
if (!$this->entity
->isNew()) {
$actions['done'] = [
'#type' => 'submit',
'#value' => $this
->t('Done'),
'#submit' => [
'::submitForm',
'::save',
],
'#op' => 'done',
'#weight' => 7,
];
}
elseif ($this->step === 1) {
$actions['submit']['#value'] = $this
->t('Continue');
}
$actions['submit']['#op'] = 'save';
return $actions;
}