public Node::setSticky($sticky)
Sets the node sticky status.
Parameters
bool $sticky: TRUE to set this node to sticky, FALSE to set it to not sticky.
Return value
\Drupal\node\NodeInterface The called node entity.
Overrides NodeInterface::setSticky
File
- core/modules/node/src/Entity/Node.php, line 241
Class
- Node
- Defines the node entity class.
Namespace
Drupal\node\Entity
Code
public function setSticky($sticky) { $this->set('sticky', $sticky ? NODE_STICKY : NODE_NOT_STICKY); return $this; }
Please login to continue.