interface NodeInterface
Same name and namespace in other branches
- 11.x core/modules/node/src/NodeInterface.php \Drupal\node\NodeInterface
- 10 core/modules/node/src/NodeInterface.php \Drupal\node\NodeInterface
- 9 core/modules/node/src/NodeInterface.php \Drupal\node\NodeInterface
- 8.9.x core/modules/node/src/NodeInterface.php \Drupal\node\NodeInterface
Provides an interface defining a node entity.
Hierarchy
- interface \Drupal\Core\Entity\ContentEntityInterface extends \Drupal\Core\Entity\Traversable, \Drupal\Core\Entity\FieldableEntityInterface, \Drupal\Core\Entity\TranslatableRevisionableInterface, \Drupal\Core\Entity\SynchronizableInterface; interface \Drupal\Core\Entity\EntityChangedInterface extends \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\EntityPublishedInterface extends \Drupal\Core\Entity\EntityInterface; interface \Drupal\Core\Entity\RevisionLogInterface extends \Drupal\Core\Entity\RevisionableInterface; interface \Drupal\user\EntityOwnerInterface
Expanded class hierarchy of NodeInterface
All classes that implement NodeInterface
79 files declare their use of NodeInterface
- CommentHooks.php in core/
modules/ comment/ src/ Hook/ CommentHooks.php - ContentImportTest.php in core/
tests/ Drupal/ FunctionalTests/ DefaultContent/ ContentImportTest.php - Date.php in core/
modules/ views/ src/ Plugin/ views/ argument/ Date.php - DefaultMenuLinkTreeManipulators.php in core/
lib/ Drupal/ Core/ Menu/ DefaultMenuLinkTreeManipulators.php - DefaultMenuLinkTreeManipulatorsTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ DefaultMenuLinkTreeManipulatorsTest.php
File
-
core/
modules/ node/ src/ NodeInterface.php, line 14
Namespace
Drupal\nodeView source
interface NodeInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface, RevisionLogInterface, EntityPublishedInterface {
/**
* Denotes that the node is not published.
*/
const NOT_PUBLISHED = 0;
/**
* Denotes that the node is published.
*/
const PUBLISHED = 1;
/**
* Denotes that the node is not promoted to the front page.
*/
const NOT_PROMOTED = 0;
/**
* Denotes that the node is promoted to the front page.
*/
const PROMOTED = 1;
/**
* Denotes that the node is not sticky at the top of the page.
*/
const NOT_STICKY = 0;
/**
* Denotes that the node is sticky at the top of the page.
*/
const STICKY = 1;
/**
* Gets the node type.
*
* @return string
* The node type.
*/
public function getType();
/**
* Gets the node title.
*
* @return string|null
* Title of the node, or NULL if the node doesn't yet have a title (for
* example, if a new node is being previewed).
*/
public function getTitle();
/**
* Sets the node title.
*
* @param string $title
* The node title.
*
* @return $this
* The called node entity.
*/
public function setTitle($title);
/**
* Gets the node creation timestamp.
*
* @return int
* Creation timestamp of the node.
*/
public function getCreatedTime();
/**
* Sets the node creation timestamp.
*
* @param int $timestamp
* The node creation timestamp.
*
* @return $this
* The called node entity.
*/
public function setCreatedTime($timestamp);
/**
* Returns the node promotion status.
*
* @return bool
* TRUE if the node is promoted.
*/
public function isPromoted();
/**
* Sets the node promoted status.
*
* @param bool $promoted
* TRUE to set this node to promoted, FALSE to set it to not promoted.
*
* @return $this
* The called node entity.
*/
public function setPromoted($promoted);
/**
* Returns the node sticky status.
*
* @return bool
* TRUE if the node is sticky.
*/
public function isSticky();
/**
* Sets the node sticky status.
*
* @param bool $sticky
* TRUE to set this node to sticky, FALSE to set it to not sticky.
*
* @return $this
* The called node entity.
*/
public function setSticky($sticky);
/**
* Gets the node revision creation timestamp.
*
* @return int
* The UNIX timestamp of when this revision was created.
*/
public function getRevisionCreationTime();
/**
* Sets the node revision creation timestamp.
*
* @param int $timestamp
* The UNIX timestamp of when this revision was created.
*
* @return $this
* The called node entity.
*/
public function setRevisionCreationTime($timestamp);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.