c074fe9e5a3df8e59abc67d232da3073d3b39e35
[yaffs-website] / web / core / modules / node / src / Plugin / Action / UnstickyNode.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  * Makes a node not sticky.
10  *
11  * @Action(
12  *   id = "node_make_unsticky_action",
13  *   label = @Translation("Make selected content not sticky"),
14  *   type = "node"
15  * )
16  */
17 class UnstickyNode extends FieldUpdateActionBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   protected function getFieldsToUpdate() {
23     return ['sticky' => NodeInterface::NOT_STICKY];
24   }
25
26 }