public function UnpublishByKeywordNode::form

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Return value

array The form structure.

Overrides ConfigurableActionInterface::form

File

drupal/core/modules/node/lib/Drupal/node/Plugin/Action/UnpublishByKeywordNode.php, line 51
Contains \Drupal\node\Plugin\Action\UnpublishByKeywordNode.

Class

UnpublishByKeywordNode
Unpublishes a node containing certain keywords.

Namespace

Drupal\node\Plugin\Action

Code

public function form(array $form, array &$form_state) {
  $form['keywords'] = array(
    '#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' => drupal_implode_tags($this->configuration['keywords']),
  );
  return $form;
}