You are here

public function Node::isSticky in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::isSticky()

Returns the node sticky status.

Return value

bool TRUE if the node is sticky.

Overrides NodeInterface::isSticky

File

core/modules/node/src/Entity/Node.php, line 246

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function isSticky() {
  return (bool) $this
    ->get('sticky')->value;
}