You are here

public function ActionDeleteForm::form in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Form/ActionDeleteForm.php \Drupal\business_rules\Form\ActionDeleteForm::form()

Gets the actual form array to be built.

Overrides EntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/Form/ActionDeleteForm.php, line 24

Class

ActionDeleteForm
Builds the form to delete Action entities.

Namespace

Drupal\business_rules\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);

  /** @var \Drupal\business_rules\Util\BusinessRulesUtil $util */
  $util = \Drupal::service('business_rules.util');
  $form['rules_using_this_item'] = $util
    ->getUsedByBusinessRulesDetailsBox($this->entity);
  $form['conditions_using_this_item'] = $util
    ->getUsedByConditionsDetailsBox($this->entity);
  $form['actions_using_this_item'] = $util
    ->getUsedByActionsDetailsBox($this->entity);
  return $form;
}