You are here

public function VariableDeleteForm::form in Business Rules 8

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

Class

VariableDeleteForm
Builds the form to delete Variable 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['conditions_using_this_item'] = $util
    ->getUsedByConditionsDetailsBox($this->entity);
  $form['actions_using_this_item'] = $util
    ->getUsedByActionsDetailsBox($this->entity);
  return $form;
}