function Node::setSticky
Sets the node sticky status.
Parameters
bool $sticky: TRUE to set this node to sticky, FALSE to set it to not sticky.
Return value
$this The called node entity.
Overrides NodeInterface::setSticky
File
- 
              core/
modules/ node/ src/ Entity/ Node.php, line 255  
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.