You are here

public function ConditionDeleteForm::form in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Form/ConditionDeleteForm.php \Drupal\business_rules\Form\ConditionDeleteForm::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/ConditionDeleteForm.php, line 24

Class

ConditionDeleteForm
Builds the form to delete Condition 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;
}