Node::isPublished

public Node::isPublished()

Returns the node published status indicator.

Unpublished nodes are only visible to their authors and to administrators.

Return value

bool TRUE if the node is published.

Overrides NodeInterface::isPublished

File

core/modules/node/src/Entity/Node.php, line 248

Class

Node
Defines the node entity class.

Namespace

Drupal\node\Entity

Code

public function isPublished() {
  return (bool) $this->getEntityKey('status');
}
doc_Drupal
2016-10-29 09:30:22
Comments
Leave a Comment

Please login to continue.