1. 8.5.x core/modules/node/src/NodeInterface.php NodeInterface
  2. 8.5.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  3. 8.0.x core/modules/node/src/NodeInterface.php NodeInterface
  4. 8.0.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  5. 8.1.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  6. 8.1.x core/modules/node/src/NodeInterface.php NodeInterface
  7. 8.2.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  8. 8.2.x core/modules/node/src/NodeInterface.php NodeInterface
  9. 8.3.x core/modules/node/src/NodeInterface.php NodeInterface
  10. 8.3.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  11. 8.4.x core/modules/node/src/NodeInterface.php NodeInterface
  12. 8.4.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  13. 8.6.x vendor/symfony/css-selector/Node/NodeInterface.php NodeInterface
  14. 8.6.x core/modules/node/src/NodeInterface.php NodeInterface

Provides an interface defining a node entity.

Hierarchy

Expanded class hierarchy of NodeInterface

All classes that implement NodeInterface

56 files declare their use of NodeInterface
book.module in core/modules/book/book.module
Allows users to create and organize related content in an outline.
BookAdminEditForm.php in core/modules/book/src/Form/BookAdminEditForm.php
BookBreadcrumbBuilder.php in core/modules/book/src/BookBreadcrumbBuilder.php
BookController.php in core/modules/book/src/Controller/BookController.php
BookExport.php in core/modules/book/src/BookExport.php

... See full list

File

core/modules/node/src/NodeInterface.php, line 13

Namespace

Drupal\node
View source
interface NodeInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface, RevisionLogInterface {

  /**
   * Gets the node type.
   *
   * @return string
   *   The node type.
   */
  public function getType();

  /**
   * Gets the node title.
   *
   * @return string
   *   Title of the node.
   */
  public function getTitle();

  /**
   * Sets the node title.
   *
   * @param string $title
   *   The node title.
   *
   * @return \Drupal\node\NodeInterface
   *   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 \Drupal\node\NodeInterface
   *   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 \Drupal\node\NodeInterface
   *   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 \Drupal\node\NodeInterface
   *   The called node entity.
   */
  public function setSticky($sticky);

  /**
   * Returns the node published status indicator.
   *
   * Unpublished nodes are only visible to their authors and to administrators.
   *
   * @return bool
   *   TRUE if the node is published.
   */
  public function isPublished();

  /**
   * Sets the published status of a node..
   *
   * @param bool $published
   *   TRUE to set this node to published, FALSE to set it to unpublished.
   *
   * @return \Drupal\node\NodeInterface
   *   The called node entity.
   */
  public function setPublished($published);

  /**
   * 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 \Drupal\node\NodeInterface
   *   The called node entity.
   */
  public function setRevisionCreationTime($timestamp);

  /**
   * Gets the node revision author.
   *
   * @return \Drupal\user\UserInterface
   *   The user entity for the revision author.
   *
   * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
   *   \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser() instead.
   */
  public function getRevisionAuthor();

  /**
   * Sets the node revision author.
   *
   * @param int $uid
   *   The user ID of the revision author.
   *
   * @return \Drupal\node\NodeInterface
   *   The called node entity.
   *
   * @deprecated in Drupal 8.2.0, will be removed before Drupal 9.0.0. Use
   *   \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId() instead.
   */
  public function setRevisionAuthorId($uid);

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access.
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags
ContentEntityInterface::hasTranslationChanges public function Determines if the current translation of the entity has unsaved changes.
ContentEntityInterface::isRevisionTranslationAffected public function Checks whether the current translation is affected by the current revision.
ContentEntityInterface::setRevisionTranslationAffected public function Marks the current revision translation as affected.
EntityChangedInterface::getChangedTime public function Gets the timestamp of the last entity change for the current translation.
EntityChangedInterface::getChangedTimeAcrossTranslations public function Gets the timestamp of the last entity change across all translations.
EntityChangedInterface::setChangedTime public function Sets the timestamp of the last entity change for the current translation.
EntityInterface::bundle public function Gets the bundle of the entity.
EntityInterface::create public static function Constructs a new entity object, without permanently saving it.
EntityInterface::createDuplicate public function Creates a duplicate of the entity.
EntityInterface::delete public function Deletes an entity permanently.
EntityInterface::enforceIsNew public function Enforces an entity to be new.
EntityInterface::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches.
EntityInterface::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies.
EntityInterface::getConfigDependencyName public function Gets the configuration dependency name.
EntityInterface::getConfigTarget public function Gets the configuration target identifier for the entity.
EntityInterface::getEntityType public function Gets the entity type definition.
EntityInterface::getEntityTypeId public function Gets the ID of the type of the entity.
EntityInterface::getOriginalId public function Gets the original ID.
EntityInterface::getTypedData public function Gets a typed data object for this entity object.
EntityInterface::hasLinkTemplate public function Indicates if a link template exists for a given key.
EntityInterface::id public function Gets the identifier.
EntityInterface::isNew public function Determines whether the entity is new.
EntityInterface::label public function Gets the label of the entity.
EntityInterface::language public function Gets the language of the entity.
EntityInterface::link Deprecated public function Deprecated way of generating a link to the entity. See toLink().
EntityInterface::load public static function Loads an entity.
EntityInterface::loadMultiple public static function Loads one or more entities.
EntityInterface::postCreate public function Acts on a created entity before hooks are invoked.
EntityInterface::postDelete public static function Acts on deleted entities before the delete hook is invoked.
EntityInterface::postLoad public static function Acts on loaded entities.
EntityInterface::postSave public function Acts on a saved entity before the insert or update hook is invoked.
EntityInterface::preCreate public static function Changes the values of an entity before it is created.
EntityInterface::preDelete public static function Acts on entities before they are deleted and before hooks are invoked.
EntityInterface::preSave public function Acts on an entity before the presave hook is invoked.
EntityInterface::referencedEntities public function Gets a list of entities referenced by this entity.
EntityInterface::save public function Saves an entity permanently.
EntityInterface::setOriginalId public function Sets the original ID.
EntityInterface::toLink public function Generates the HTML for a link to this entity.
EntityInterface::toUrl public function Gets the URL object for the entity.
EntityInterface::uriRelationships public function Gets a list of URI relationships supported by this entity.
EntityInterface::url Deprecated public function Gets the public URL for this entity.
EntityInterface::urlInfo Deprecated public function Gets the URL object for the entity.
EntityInterface::uuid public function Gets the entity UUID (Universally Unique Identifier).
EntityOwnerInterface::getOwner public function Returns the entity owner's user entity.
EntityOwnerInterface::getOwnerId public function Returns the entity owner's user ID.
EntityOwnerInterface::setOwner public function Sets the entity owner's user entity.
EntityOwnerInterface::setOwnerId public function Sets the entity owner's user ID.
FieldableEntityInterface::baseFieldDefinitions public static function Provides base field definitions for an entity type.
FieldableEntityInterface::bundleFieldDefinitions public static function Provides field definitions for a specific bundle.
FieldableEntityInterface::get public function Gets a field item list.
FieldableEntityInterface::getFieldDefinition public function Gets the definition of a contained field.
FieldableEntityInterface::getFieldDefinitions public function Gets an array of field definitions of all contained fields.
FieldableEntityInterface::getFields public function Gets an array of all field item lists.
FieldableEntityInterface::getTranslatableFields public function Gets an array of field item lists for translatable fields.
FieldableEntityInterface::hasField public function Determines whether the entity has a field with the given name.
FieldableEntityInterface::isValidationRequired public function Checks whether entity validation is required before saving the entity.
FieldableEntityInterface::onChange public function Reacts to changes to a field.
FieldableEntityInterface::set public function Sets a field value.
FieldableEntityInterface::setValidationRequired public function Sets whether entity validation is required before saving the entity.
FieldableEntityInterface::toArray public function Gets an array of all field values. Overrides EntityInterface::toArray
FieldableEntityInterface::validate public function Validates the currently set values.
NodeInterface::getCreatedTime public function Gets the node creation timestamp.
NodeInterface::getRevisionAuthor Deprecated public function Gets the node revision author.
NodeInterface::getRevisionCreationTime public function Gets the node revision creation timestamp. Overrides RevisionLogInterface::getRevisionCreationTime
NodeInterface::getTitle public function Gets the node title.
NodeInterface::getType public function Gets the node type.
NodeInterface::isPromoted public function Returns the node promotion status.
NodeInterface::isPublished public function Returns the node published status indicator.
NodeInterface::isSticky public function Returns the node sticky status.
NodeInterface::setCreatedTime public function Sets the node creation timestamp.
NodeInterface::setPromoted public function Sets the node promoted status.
NodeInterface::setPublished public function Sets the published status of a node..
NodeInterface::setRevisionAuthorId Deprecated public function Sets the node revision author.
NodeInterface::setRevisionCreationTime public function Sets the node revision creation timestamp. Overrides RevisionLogInterface::setRevisionCreationTime
NodeInterface::setSticky public function Sets the node sticky status.
NodeInterface::setTitle public function Sets the node title.
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata.
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts.
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags.
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age.
RevisionableInterface::getRevisionId public function Gets the revision identifier of the entity.
RevisionableInterface::isDefaultRevision public function Checks if this entity is the default revision.
RevisionableInterface::isNewRevision public function Determines whether a new revision should be created on save.
RevisionableInterface::preSaveRevision public function Acts on a revision before it gets saved.
RevisionableInterface::setNewRevision public function Enforces an entity to be saved as a new revision.
RevisionLogInterface::getRevisionLogMessage public function Returns the entity revision log message.
RevisionLogInterface::getRevisionUser public function Gets the entity revision author.
RevisionLogInterface::getRevisionUserId public function Gets the entity revision author ID.
RevisionLogInterface::setRevisionLogMessage public function Sets the entity revision log message.
RevisionLogInterface::setRevisionUser public function Sets the entity revision author.
RevisionLogInterface::setRevisionUserId public function Sets the entity revision author by ID.
TranslatableInterface::addTranslation public function Adds a new translation to the translatable object.
TranslatableInterface::getTranslation public function Gets a translation of the data.
TranslatableInterface::getTranslationLanguages public function Returns the languages the data is translated to.
TranslatableInterface::getUntranslated public function Returns the translatable object referring to the original language.
TranslatableInterface::hasTranslation public function Returns TRUE there is a translation for the given language code.
TranslatableInterface::isDefaultTranslation public function Checks whether the translation is the default one.
TranslatableInterface::isNewTranslation public function Checks whether the translation is new.
TranslatableInterface::isTranslatable public function Returns the translation support status.
TranslatableInterface::removeTranslation public function Removes the translation identified by the given language code.