function Node::isPromoted

Returns the node promotion status.

Return value

bool TRUE if the node is promoted.

Overrides NodeInterface::isPromoted

File

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

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

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

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