function WorkflowTransitionDeleteForm::buildForm
Same name in other branches
- 9 core/modules/workflows/src/Form/WorkflowTransitionDeleteForm.php \Drupal\workflows\Form\WorkflowTransitionDeleteForm::buildForm()
- 8.9.x core/modules/workflows/src/Form/WorkflowTransitionDeleteForm.php \Drupal\workflows\Form\WorkflowTransitionDeleteForm::buildForm()
- 11.x core/modules/workflows/src/Form/WorkflowTransitionDeleteForm.php \Drupal\workflows\Form\WorkflowTransitionDeleteForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\workflows\WorkflowInterface $workflow: The workflow entity being edited.
string|null $workflow_transition: The workflow transition being deleted.
Return value
array The form structure.
Overrides ConfirmFormBase::buildForm
File
-
core/
modules/ workflows/ src/ Form/ WorkflowTransitionDeleteForm.php, line 81
Class
- WorkflowTransitionDeleteForm
- Builds the form to delete transitions from Workflow entities.
Namespace
Drupal\workflows\FormCode
public function buildForm(array $form, FormStateInterface $form_state, ?WorkflowInterface $workflow = NULL, $workflow_transition = NULL) {
try {
$this->transition = $workflow->getTypePlugin()
->getTransition($workflow_transition);
} catch (\InvalidArgumentException $e) {
throw new NotFoundHttpException();
}
$this->workflow = $workflow;
return parent::buildForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.