class StickyNode

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

Makes a node sticky.

Plugin annotation


@Action(
  id = "node_make_sticky_action",
  label = @Translation("Make selected content sticky"),
  type = "node"
)

Hierarchy

Expanded class hierarchy of StickyNode

File

core/modules/node/src/Plugin/Action/StickyNode.php, line 17

Namespace

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

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ActionBase::executeMultiple public function Executes the plugin for an array of objects. Overrides ActionInterface::executeMultiple 3
FieldUpdateActionBase::access public function Checks object access. Overrides ActionInterface::access
FieldUpdateActionBase::execute public function Executes the plugin. 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
StickyNode::getFieldsToUpdate protected function Gets an array of values to be set. Overrides FieldUpdateActionBase::getFieldsToUpdate

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