class UnstickyNode

Same name and namespace in other branches
  1. 9 core/modules/node/src/Plugin/Action/UnstickyNode.php \Drupal\node\Plugin\Action\UnstickyNode
  2. 8.9.x core/modules/node/src/Plugin/Action/UnstickyNode.php \Drupal\node\Plugin\Action\UnstickyNode
  3. 10 core/modules/node/src/Plugin/Action/UnstickyNode.php \Drupal\node\Plugin\Action\UnstickyNode

Makes a node not sticky.

Attributes

#[Action(id: 'node_make_unsticky_action', label: new TranslatableMarkup('Make selected content not sticky'), type: 'node')]

Hierarchy

Expanded class hierarchy of UnstickyNode

File

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

Namespace

Drupal\node\Plugin\Action
View source
class UnstickyNode extends FieldUpdateActionBase {
  
  /**
   * {@inheritdoc}
   */
  protected function getFieldsToUpdate() {
    return [
      'sticky' => NodeInterface::NOT_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. 7
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 3
UnstickyNode::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.