Mercurial > hg > isophonics-drupal-site
comparison core/modules/node/src/Plugin/Action/PromoteNode.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 * 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 } |