Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / node / src / Plugin / Action / PromoteNode.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  * Promotes a node.
10  *
11  * @Action(
12  *   id = "node_promote_action",
13  *   label = @Translation("Promote selected content to front page"),
14  *   type = "node"
15  * )
16  */
17 class PromoteNode extends FieldUpdateActionBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function getFieldsToUpdate() {
23     return ['promote' => NodeInterface::PROMOTED];
24   }
25
26 }