function EntityPublishedTrait::setUnpublished
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityPublishedTrait.php \Drupal\Core\Entity\EntityPublishedTrait::setUnpublished()
- 10 core/lib/Drupal/Core/Entity/EntityPublishedTrait.php \Drupal\Core\Entity\EntityPublishedTrait::setUnpublished()
- 11.x core/lib/Drupal/Core/Entity/EntityPublishedTrait.php \Drupal\Core\Entity\EntityPublishedTrait::setUnpublished()
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityPublishedTrait.php, line 71
Class
- EntityPublishedTrait
- Provides a trait for published status.
Namespace
Drupal\Core\EntityCode
public function setUnpublished() {
$key = $this->getEntityType()
->getKey('published');
$this->set($key, FALSE);
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.