Same name and namespace in other branches
  1. 8.9.x core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::isSticky()
  2. 9 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 247

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

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