comparison core/modules/node/src/Plugin/Action/StickyNode.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 sticky.
10 *
11 * @Action(
12 * id = "node_make_sticky_action",
13 * label = @Translation("Make selected content sticky"),
14 * type = "node"
15 * )
16 */
17 class StickyNode extends FieldUpdateActionBase {
18
19 /**
20 * {@inheritdoc}
21 */
22 protected function getFieldsToUpdate() {
23 return ['sticky' => NodeInterface::STICKY];
24 }
25
26 }