function Node::setSticky
Same name in other branches
- 9 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::setSticky()
- 10 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::setSticky()
- 11.x core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node::setSticky()
Overrides NodeInterface::setSticky
File
-
core/
modules/ node/ src/ Entity/ Node.php, line 253
Class
- Node
- Defines the node entity class.
Namespace
Drupal\node\EntityCode
public function setSticky($sticky) {
$this->set('sticky', $sticky ? NodeInterface::STICKY : NodeInterface::NOT_STICKY);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.