You are here

public function PublishContent::getSettingsForm in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/BusinessRulesAction/PublishContent.php \Drupal\business_rules\Plugin\BusinessRulesAction\PublishContent::getSettingsForm()

Return the form array.

@internal param array $form

Parameters

array $form: The form array.

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

\Drupal\business_rules\ItemInterface $item: The configured item.

Return value

array The render array for the settings form.

Overrides BusinessRulesItemPluginBase::getSettingsForm

File

src/Plugin/BusinessRulesAction/PublishContent.php, line 40

Class

PublishContent
Class PublishContent.

Namespace

Drupal\business_rules\Plugin\BusinessRulesAction

Code

public function getSettingsForm(array &$form, FormStateInterface $form_state, ItemInterface $item) {
  $settings['value'] = [
    '#type' => 'textfield',
    '#title' => t('Value'),
    '#required' => TRUE,
    '#default_value' => $item
      ->getSettings('value'),
    '#description' => t('The value to be compared against the field.
        <br>All entities which the field equals to this value will be published.'),
  ];
  return $settings;
}