function WorkflowTransitionEditForm::actions
Same name in other branches
- 8.9.x core/modules/workflows/src/Form/WorkflowTransitionEditForm.php \Drupal\workflows\Form\WorkflowTransitionEditForm::actions()
- 10 core/modules/workflows/src/Form/WorkflowTransitionEditForm.php \Drupal\workflows\Form\WorkflowTransitionEditForm::actions()
- 11.x core/modules/workflows/src/Form/WorkflowTransitionEditForm.php \Drupal\workflows\Form\WorkflowTransitionEditForm::actions()
Overrides EntityForm::actions
File
-
core/
modules/ workflows/ src/ Form/ WorkflowTransitionEditForm.php, line 210
Class
- WorkflowTransitionEditForm
- Entity form variant for editing workflow transitions.
Namespace
Drupal\workflows\FormCode
protected function actions(array $form, FormStateInterface $form_state) {
$actions['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Save'),
'#submit' => [
'::submitForm',
'::save',
],
];
$actions['delete'] = [
'#type' => 'link',
'#title' => $this->t('Delete'),
// Deleting a transition is editing a workflow.
'#access' => $this->entity
->access('edit'),
'#attributes' => [
'class' => [
'button',
'button--danger',
],
],
'#url' => Url::fromRoute('entity.workflow.delete_transition_form', [
'workflow' => $this->entity
->id(),
'workflow_transition' => $this->transitionId,
]),
];
return $actions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.