function PromoteNode::getFieldsToUpdate

Same name in other branches
  1. 9 core/modules/node/src/Plugin/Action/PromoteNode.php \Drupal\node\Plugin\Action\PromoteNode::getFieldsToUpdate()
  2. 10 core/modules/node/src/Plugin/Action/PromoteNode.php \Drupal\node\Plugin\Action\PromoteNode::getFieldsToUpdate()
  3. 11.x core/modules/node/src/Plugin/Action/PromoteNode.php \Drupal\node\Plugin\Action\PromoteNode::getFieldsToUpdate()

Overrides FieldUpdateActionBase::getFieldsToUpdate

File

core/modules/node/src/Plugin/Action/PromoteNode.php, line 22

Class

PromoteNode
Promotes a node.

Namespace

Drupal\node\Plugin\Action

Code

protected function getFieldsToUpdate() {
    return [
        'promote' => NodeInterface::PROMOTED,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.