protected function BusinessRuleForm::actionsElement in Business Rules 8
Same name and namespace in other branches
- 2.x src/Form/BusinessRuleForm.php \Drupal\business_rules\Form\BusinessRuleForm::actionsElement()
Returns the action form element for the current entity form.
Overrides EntityForm::actionsElement
File
- src/
Form/ BusinessRuleForm.php, line 456
Class
- BusinessRuleForm
- Class BusinessRuleForm.
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,
'#validate' => [
'::validateForm',
],
];
}
elseif ($this->step === 1) {
$actions['submit']['#value'] = $this
->t('Continue');
}
$actions['submit']['#op'] = 'save';
return $actions;
}