You are here

public function ActionSet::buildForm in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Plugin/BusinessRulesAction/ActionSet.php \Drupal\business_rules\Plugin\BusinessRulesAction\ActionSet::buildForm()

Form constructor.

Give a chance to plugin to change the buildForm method.

Parameters

array $form: The form array.

\Drupal\Core\Form\FormStateInterface $form_state: The form state object.

Overrides BusinessRulesItemPluginBase::buildForm

File

src/Plugin/BusinessRulesAction/ActionSet.php, line 325

Class

ActionSet
Class ActionSet.

Namespace

Drupal\business_rules\Plugin\BusinessRulesAction

Code

public function buildForm(array &$form, FormStateInterface $form_state) {
  $action = $form_state
    ->get('business_rule_action');
  if (!empty($action) && $action
    ->isNew()) {
    $form['actions']['submit']['#value'] = t('Continue');
  }

  // We don't need variables for this action.
  unset($form['variables']);
}