You are here

public function UnpublishByKeywordNode::buildConfigurationForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php \Drupal\node\Plugin\Action\UnpublishByKeywordNode::buildConfigurationForm()
  2. 9 core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php \Drupal\node\Plugin\Action\UnpublishByKeywordNode::buildConfigurationForm()

File

core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php, line 50

Class

UnpublishByKeywordNode
Unpublishes a node containing certain keywords.

Namespace

Drupal\node\Plugin\Action

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form['keywords'] = [
    '#title' => t('Keywords'),
    '#type' => 'textarea',
    '#description' => t('The content will be unpublished if it contains any of the phrases above. Use a case-sensitive, comma-separated list of phrases. Example: funny, bungee jumping, "Company, Inc."'),
    '#default_value' => Tags::implode($this->configuration['keywords']),
  ];
  return $form;
}