You are here

class StickyNode in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/src/Plugin/Action/StickyNode.php \Drupal\node\Plugin\Action\StickyNode
  2. 9 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