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