function UnpublishByKeywordNode::buildConfigurationForm
Same name in other branches
- 8.9.x core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php \Drupal\node\Plugin\Action\UnpublishByKeywordNode::buildConfigurationForm()
- 11.x core/modules/node/src/Plugin/Action/UnpublishByKeywordNode.php \Drupal\node\Plugin\Action\UnpublishByKeywordNode::buildConfigurationForm()
- 10 core/modules/action/src/Plugin/Action/UnpublishByKeywordNode.php \Drupal\action\Plugin\Action\UnpublishByKeywordNode::buildConfigurationForm()
Overrides PluginFormInterface::buildConfigurationForm
File
-
core/
modules/ node/ src/ Plugin/ Action/ UnpublishByKeywordNode.php, line 50
Class
- UnpublishByKeywordNode
- Unpublishes a node containing certain keywords.
Namespace
Drupal\node\Plugin\ActionCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form['keywords'] = [
'#title' => $this->t('Keywords'),
'#type' => 'textarea',
'#description' => $this->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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.