Node::setOwner

public Node::setOwner(UserInterface $account) Sets the entity owner's user entity. Parameters \Drupal\user\UserInterface $account: The owner user entity. Return value $this Overrides EntityOwnerInterface::setOwner File core/modules/node/src/Entity/Node.php, line 285 Class Node Defines the node entity class. Namespace Drupal\node\Entity Code public function setOwner(UserInterface $account) { $this->set('uid', $account->id()); return $this; }

Node::setCreatedTime

public Node::setCreatedTime($timestamp) Sets the node creation timestamp. Parameters int $timestamp: The node creation timestamp. Return value \Drupal\node\NodeInterface The called node entity. Overrides NodeInterface::setCreatedTime File core/modules/node/src/Entity/Node.php, line 211 Class Node Defines the node entity class. Namespace Drupal\node\Entity Code public function setCreatedTime($timestamp) { $this->set('created', $timestamp); return $this; }

Node::preSaveRevision

public Node::preSaveRevision(EntityStorageInterface $storage, \stdClass $record) Acts on a revision before it gets saved. Parameters EntityStorageInterface $storage: The entity storage object. \stdClass $record: The revision object. Overrides ContentEntityBase::preSaveRevision File core/modules/node/src/Entity/Node.php, line 113 Class Node Defines the node entity class. Namespace Drupal\node\Entity Code public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record

Node::preSave

public Node::preSave(EntityStorageInterface $storage) Acts on an entity before the presave hook is invoked. Used before the entity is saved and before invoking the presave hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. This is different from its counterpart in the Field API, FieldItemListInterface::preSave(), which is fired on all field translations automatic

Node::preDelete

public static Node::preDelete(EntityStorageInterface $storage, array $entities) Acts on entities before they are deleted and before hooks are invoked. Used before the entities are deleted and before invoking the delete hook. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. \Drupal\Core\Entity\EntityInterface[] $entities: An array of entities. Overrides Entity::preDelete File core/modules/node/src/Entity/Node.php, line 151 Class Node Defines the no

Node::postSave

public Node::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. bool $upda

Node::postDelete

public static Node::postDelete(EntityStorageInterface $storage, array $nodes) Acts on deleted entities before the delete hook is invoked. Used after the entities are deleted but before invoking the delete hook. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. \Drupal\Core\Entity\EntityInterface[] $entities: An array of entities. Overrides Entity::postDelete File core/modules/node/src/Entity/Node.php, line 165 Class Node Defines the node entity cla

Node::isSticky

public Node::isSticky() Returns the node sticky status. Return value bool TRUE if the node is sticky. Overrides NodeInterface::isSticky File core/modules/node/src/Entity/Node.php, line 234 Class Node Defines the node entity class. Namespace Drupal\node\Entity Code public function isSticky() { return (bool) $this->get('sticky')->value; }

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'); }

Node::isPromoted

public Node::isPromoted() Returns the node promotion status. Return value bool TRUE if the node is promoted. Overrides NodeInterface::isPromoted File core/modules/node/src/Entity/Node.php, line 219 Class Node Defines the node entity class. Namespace Drupal\node\Entity Code public function isPromoted() { return (bool) $this->get('promote')->value; }