class DemoteNode

Same name in other branches
  1. 9 core/modules/node/src/Plugin/Action/DemoteNode.php \Drupal\node\Plugin\Action\DemoteNode
  2. 8.9.x core/modules/node/src/Plugin/Action/DemoteNode.php \Drupal\node\Plugin\Action\DemoteNode
  3. 11.x core/modules/node/src/Plugin/Action/DemoteNode.php \Drupal\node\Plugin\Action\DemoteNode

Demotes a node.

Hierarchy

Expanded class hierarchy of DemoteNode

File

core/modules/node/src/Plugin/Action/DemoteNode.php, line 13

Namespace

Drupal\node\Plugin\Action
View source
class DemoteNode extends FieldUpdateActionBase {
    
    /**
     * {@inheritdoc}
     */
    protected function getFieldsToUpdate() {
        return [
            'promote' => NodeInterface::NOT_PROMOTED,
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ActionBase::executeMultiple public function Overrides ActionInterface::executeMultiple 3
DemoteNode::getFieldsToUpdate protected function Gets an array of values to be set. Overrides FieldUpdateActionBase::getFieldsToUpdate
FieldUpdateActionBase::access public function Overrides ActionInterface::access
FieldUpdateActionBase::execute public function Overrides ExecutableInterface::execute
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2

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