Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / node / src / Plugin / Action / UnpublishNode.php
1 <?php
2
3 namespace Drupal\node\Plugin\Action;
4
5 use Drupal\Core\Field\FieldUpdateActionBase;
6 use Drupal\node\NodeInterface;
7
8 /**
9  * Unpublishes a node.
10  *
11  * @Action(
12  *   id = "node_unpublish_action",
13  *   label = @Translation("Unpublish selected content"),
14  *   type = "node"
15  * )
16  */
17 class UnpublishNode extends FieldUpdateActionBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function getFieldsToUpdate() {
23     return ['status' => NodeInterface::NOT_PUBLISHED];
24   }
25
26 }