class Node
Same name in this branch
- main core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- main core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- main core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- main core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- main core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
Same name and namespace in other branches
- 11.x core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node
- 11.x core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- 11.x core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- 11.x core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- 11.x core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- 11.x core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
- 10 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node
- 10 core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- 10 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- 10 core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- 10 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- 10 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
- 9 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node
- 9 core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- 9 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- 9 core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- 9 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- 9 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
- 8.9.x core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node
- 8.9.x core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- 8.9.x core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- 8.9.x core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- 8.9.x core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- 8.9.x core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
Defines the node entity class.
Attributes
#[ContentEntityType(id: 'node', label: new TranslatableMarkup('Content'), label_collection: new TranslatableMarkup('Content'), label_singular: new TranslatableMarkup('content item'), label_plural: new TranslatableMarkup('content items'), entity_keys: [
'id' => 'nid',
'revision' => 'vid',
'bundle' => 'type',
'label' => 'title',
'langcode' => 'langcode',
'uuid' => 'uuid',
'status' => 'status',
'published' => 'status',
'uid' => 'uid',
'owner' => 'uid',
], handlers: [
'storage' => NodeStorage::class,
'storage_schema' => NodeStorageSchema::class,
'view_builder' => NodeViewBuilder::class,
'access' => NodeAccessControlHandler::class,
'views_data' => NodeViewsData::class,
'form' => [
'default' => NodeForm::class,
'delete' => NodeDeleteForm::class,
'edit' => NodeForm::class,
'delete-multiple-confirm' => DeleteMultiple::class,
],
'route_provider' => [
'html' => NodeRouteProvider::class,
],
'list_builder' => NodeListBuilder::class,
'translation' => NodeTranslationHandler::class,
], links: [
'canonical' => '/node/{node}',
'add-page' => '/node/add',
'add-form' => '/node/add/{node_type}',
'edit-form' => '/node/{node}/edit',
'delete-form' => '/node/{node}/delete',
'delete-multiple-form' => '/admin/content/node/delete',
'version-history' => '/node/{node}/revisions',
'revision' => '/node/{node}/revisions/{node_revision}/view',
'create' => '/node',
], collection_permission: 'access content overview', permission_granularity: 'bundle', bundle_entity_type: 'node_type', bundle_label: new TranslatableMarkup('Content type'), base_table: 'node', data_table: 'node_field_data', revision_table: 'node_revision', revision_data_table: 'node_field_revision', translatable: TRUE, show_revision_ui: TRUE, label_count: [
'singular' => '@count content item',
'plural' => '@count content items',
], field_ui_base_route: 'entity.node_type.edit_form', common_reference_target: TRUE, list_cache_contexts: [
'user.node_grants:view',
], revision_metadata_keys: [
'revision_user' => 'revision_uid',
'revision_created' => 'revision_timestamp',
'revision_log_message' => 'revision_log',
])]
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements \Drupal\Core\Entity\EntityInterface uses \Drupal\Core\Cache\RefinableCacheableDependencyTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Entity\ContentEntityBase implements \Drupal\Core\Entity\IteratorAggregate, \Drupal\Core\Entity\ContentEntityInterface, \Drupal\Core\TypedData\TranslationStatusInterface uses \Drupal\Core\Entity\EntityChangesDetectionTrait, \Drupal\Core\Entity\SynchronizableEntityTrait extends \Drupal\Core\Entity\EntityBase
- class \Drupal\Core\Entity\EditorialContentEntityBase implements \Drupal\Core\Entity\EntityChangedInterface, \Drupal\Core\Entity\EntityPublishedInterface, \Drupal\Core\Entity\RevisionLogInterface uses \Drupal\Core\Entity\EntityChangedTrait, \Drupal\Core\Entity\EntityPublishedTrait, \Drupal\Core\Entity\RevisionLogEntityTrait extends \Drupal\Core\Entity\ContentEntityBase
- class \Drupal\node\Entity\Node implements \Drupal\node\NodeInterface uses \Drupal\user\EntityOwnerTrait extends \Drupal\Core\Entity\EditorialContentEntityBase
- class \Drupal\Core\Entity\EditorialContentEntityBase implements \Drupal\Core\Entity\EntityChangedInterface, \Drupal\Core\Entity\EntityPublishedInterface, \Drupal\Core\Entity\RevisionLogInterface uses \Drupal\Core\Entity\EntityChangedTrait, \Drupal\Core\Entity\EntityPublishedTrait, \Drupal\Core\Entity\RevisionLogEntityTrait extends \Drupal\Core\Entity\ContentEntityBase
- class \Drupal\Core\Entity\ContentEntityBase implements \Drupal\Core\Entity\IteratorAggregate, \Drupal\Core\Entity\ContentEntityInterface, \Drupal\Core\TypedData\TranslationStatusInterface uses \Drupal\Core\Entity\EntityChangesDetectionTrait, \Drupal\Core\Entity\SynchronizableEntityTrait extends \Drupal\Core\Entity\EntityBase
Expanded class hierarchy of Node
190 files declare their use of Node
- ArgumentDateTimeTest.php in core/
modules/ datetime/ tests/ src/ Kernel/ Views/ ArgumentDateTimeTest.php - ArgumentDefaultTest.php in core/
modules/ views/ tests/ src/ Functional/ Plugin/ ArgumentDefaultTest.php - ArgumentNodeRevisionIdTest.php in core/
modules/ node/ tests/ src/ Kernel/ Views/ ArgumentNodeRevisionIdTest.php - ArgumentStringTest.php in core/
modules/ views/ tests/ src/ Kernel/ Handler/ ArgumentStringTest.php - ArgumentSummaryTest.php in core/
modules/ views/ tests/ src/ Kernel/ Handler/ ArgumentSummaryTest.php
1458 string references to 'Node'
- 2d3581c3-92c7-4600-8991-a0d4b3741198.yml in core/
tests/ fixtures/ default_content/ node/ 2d3581c3-92c7-4600-8991-a0d4b3741198.yml - core/tests/fixtures/default_content/node/2d3581c3-92c7-4600-8991-a0d4b3741198.yml
- 32650de8-9edd-48dc-80b8-8bda180ebbac.yml in core/
tests/ fixtures/ default_content/ node/ 32650de8-9edd-48dc-80b8-8bda180ebbac.yml - core/tests/fixtures/default_content/node/32650de8-9edd-48dc-80b8-8bda180ebbac.yml
- 3434bd5a-d2cd-4f26-bf79-a7f6b951a21b.yml in core/
tests/ fixtures/ default_content/ menu_link_content/ 3434bd5a-d2cd-4f26-bf79-a7f6b951a21b.yml - core/tests/fixtures/default_content/menu_link_content/3434bd5a-d2cd-4f26-bf79-a7f6b951a21b.yml
- 48475954-e878-439c-9d3d-226724a44269.yml in core/
tests/ fixtures/ default_content/ node/ 48475954-e878-439c-9d3d-226724a44269.yml - core/tests/fixtures/default_content/node/48475954-e878-439c-9d3d-226724a44269.yml
- 7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml in core/
tests/ fixtures/ default_content/ node/ 7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml - core/tests/fixtures/default_content/node/7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml
File
-
core/
modules/ node/ src/ Entity/ Node.php, line 28
Namespace
Drupal\node\EntityView source
class Node extends EditorialContentEntityBase implements NodeInterface {
use EntityOwnerTrait;
/**
* Whether the node is being previewed or not.
*
* The variable is set to public as it will give a considerable performance
* improvement. See https://www.drupal.org/node/2498919.
*
* @var true|null
* TRUE if the node is being previewed and NULL if it is not.
*/
// phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName
public $in_preview = NULL;
/**
* {@inheritdoc}
*/
public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
foreach (array_keys($this->getTranslationLanguages()) as $langcode) {
$translation = $this->getTranslation($langcode);
// If no owner has been set explicitly, make the anonymous user the owner.
if (!$translation->getOwner()) {
$translation->setOwnerId(0);
}
}
// If no revision author has been set explicitly, make the node owner the
// revision author.
if (!$this->getRevisionUser()) {
$this->setRevisionUserId($this->getOwnerId());
}
}
/**
* {@inheritdoc}
*/
public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
parent::preSaveRevision($storage, $record);
if (!$this->isNewRevision() && $this->getOriginal() && (!isset($record->revision_log) || $record->revision_log === '')) {
// If we are updating an existing node without adding a new revision, we
// need to make sure $entity->revision_log is reset whenever it is empty.
// Therefore, this code allows us to avoid clobbering an existing log
// entry with an empty one.
$record->revision_log = $this->getOriginal()->revision_log->value;
}
}
/**
* {@inheritdoc}
*/
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
if ($update && \Drupal::moduleHandler()->moduleExists('search')) {
// Remove deleted translations from the search index.
foreach ($this->translations as $langcode => $translation) {
if ($translation['status'] === static::TRANSLATION_REMOVED) {
\Drupal::service('search.index')->clear('node_search', $this->id(), $langcode);
}
}
}
parent::postSave($storage, $update);
// Update the node access table for this node, but only if it is the
// default revision. There's no need to delete existing records if the node
// is new.
if ($this->isDefaultRevision()) {
/** @var \Drupal\node\NodeAccessControlHandlerInterface $access_control_handler */
$access_control_handler = \Drupal::entityTypeManager()->getAccessControlHandler('node');
$grants = $access_control_handler->acquireGrants($this);
\Drupal::service('node.grant_storage')->write($this, $grants, NULL, $update);
}
}
/**
* {@inheritdoc}
*/
public static function preDelete(EntityStorageInterface $storage, array $entities) {
parent::preDelete($storage, $entities);
// Ensure that all nodes deleted are removed from the search index.
if (\Drupal::hasService('search.index')) {
/** @var \Drupal\search\SearchIndexInterface $search_index */
$search_index = \Drupal::service('search.index');
foreach ($entities as $entity) {
$search_index->clear('node_search', $entity->nid->value);
}
}
}
/**
* {@inheritdoc}
*/
public static function postDelete(EntityStorageInterface $storage, array $nodes) {
parent::postDelete($storage, $nodes);
\Drupal::service('node.grant_storage')->deleteNodeRecords(array_keys($nodes));
}
/**
* {@inheritdoc}
*/
public function getType() {
return $this->bundle();
}
/**
* {@inheritdoc}
*/
public function access($operation = 'view', ?AccountInterface $account = NULL, $return_as_object = FALSE) {
// This override exists to set the operation to the default value "view".
return parent::access($operation, $account, $return_as_object);
}
/**
* {@inheritdoc}
*/
public function getTitle() {
return $this->get('title')->value;
}
/**
* {@inheritdoc}
*/
public function setTitle($title) {
$this->set('title', $title);
return $this;
}
/**
* {@inheritdoc}
*/
public function getCreatedTime() {
return $this->get('created')->value;
}
/**
* {@inheritdoc}
*/
public function setCreatedTime($timestamp) {
$this->set('created', $timestamp);
return $this;
}
/**
* {@inheritdoc}
*/
public function isPromoted() {
return (bool) $this->get('promote')->value;
}
/**
* {@inheritdoc}
*/
public function setPromoted($promoted) {
$this->set('promote', $promoted ? NodeInterface::PROMOTED : NodeInterface::NOT_PROMOTED);
return $this;
}
/**
* {@inheritdoc}
*/
public function isSticky() {
return (bool) $this->get('sticky')->value;
}
/**
* {@inheritdoc}
*/
public function setSticky($sticky) {
$this->set('sticky', $sticky ? NodeInterface::STICKY : NodeInterface::NOT_STICKY);
return $this;
}
/**
* {@inheritdoc}
*/
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
$fields += static::ownerBaseFieldDefinitions($entity_type);
$fields['title'] = BaseFieldDefinition::create('string')->setLabel(t('Title'))
->setRequired(TRUE)
->setTranslatable(TRUE)
->setRevisionable(TRUE)
->setSetting('max_length', 255)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'string',
'weight' => -5,
])
->setDisplayOptions('form', [
'type' => 'string_textfield',
'weight' => -5,
])
->setDisplayConfigurable('form', TRUE);
$fields['uid']->setLabel(t('Authored by'))
->setDescription(t('The username of the content author.'))
->setRevisionable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'author',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'entity_reference_autocomplete',
'weight' => 5,
'settings' => [
'match_operator' => 'CONTAINS',
'size' => '60',
'placeholder' => '',
],
])
->setDisplayConfigurable('form', TRUE);
$fields['status']->setDisplayOptions('form', [
'type' => 'boolean_checkbox',
'settings' => [
'display_label' => TRUE,
],
'weight' => 120,
])
->setDisplayConfigurable('form', TRUE);
$fields['created'] = BaseFieldDefinition::create('created')->setLabel(t('Authored on'))
->setDescription(t('The date and time that the content was created.'))
->setRevisionable(TRUE)
->setTranslatable(TRUE)
->setDisplayOptions('view', [
'label' => 'hidden',
'type' => 'timestamp',
'weight' => 0,
])
->setDisplayOptions('form', [
'type' => 'datetime_timestamp',
'weight' => 10,
])
->setDisplayConfigurable('form', TRUE);
$fields['changed'] = BaseFieldDefinition::create('changed')->setLabel(t('Changed'))
->setDescription(t('The time that the node was last edited.'))
->setRevisionable(TRUE)
->setTranslatable(TRUE);
$fields['promote'] = BaseFieldDefinition::create('boolean')->setLabel(t('Promoted to front page'))
->setRevisionable(TRUE)
->setTranslatable(TRUE)
->setDefaultValue(FALSE)
->setDisplayOptions('form', [
'region' => 'hidden',
])
->setDisplayConfigurable('form', TRUE);
$fields['sticky'] = BaseFieldDefinition::create('boolean')->setLabel(t('Sticky at top of lists'))
->setRevisionable(TRUE)
->setTranslatable(TRUE)
->setDefaultValue(FALSE)
->setDisplayOptions('form', [
'region' => 'hidden',
])
->setDisplayConfigurable('form', TRUE);
return $fields;
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary | Member alias | Overriden Title |
|---|---|---|---|---|---|
| CacheableDependencyTrait::$cacheContexts | protected | property | Cache contexts. | ||
| CacheableDependencyTrait::$cacheMaxAge | protected | property | Cache max-age. | ||
| CacheableDependencyTrait::$cacheTags | protected | property | Cache tags. | ||
| CacheableDependencyTrait::setCacheability | protected | function | Sets cacheability; useful for value object constructors. | ||
| ContentEntityBase::$activeLangcode | protected | property | Language code identifying the entity active language. | ||
| ContentEntityBase::$defaultLangcode | protected | property | Local cache for the default language code. | ||
| ContentEntityBase::$defaultLangcodeKey | protected | property | The default langcode entity key. | ||
| ContentEntityBase::$enforceDefaultTranslation | protected | property | Override the result of isDefaultTranslation(). | ||
| ContentEntityBase::$enforceRevisionTranslationAffected | protected | property | Whether the revision translation affected flag has been enforced. | ||
| ContentEntityBase::$entityKeys | protected | property | Holds untranslatable entity keys such as the ID, bundle, and revision ID. | ||
| ContentEntityBase::$fieldDefinitions | protected | property | Local cache for field definitions. | ||
| ContentEntityBase::$fields | protected | property | The array of fields, each being an instance of FieldItemListInterface. | ||
| ContentEntityBase::$fieldsToSkipFromTranslationChangesCheck | protected static | property | Local cache for fields to skip from the checking for translation changes. | ||
| ContentEntityBase::$isDefaultRevision | protected | property | Indicates whether this is the default revision. | ||
| ContentEntityBase::$langcodeKey | protected | property | The language entity key. | ||
| ContentEntityBase::$languages | protected | property | Local cache for the available language objects. | ||
| ContentEntityBase::$loadedRevisionId | protected | property | The loaded revision ID before the new revision was set. | ||
| ContentEntityBase::$newRevision | protected | property | Boolean indicating whether a new revision should be created on save. | ||
| ContentEntityBase::$revisionTranslationAffectedKey | protected | property | The revision translation affected entity key. | ||
| ContentEntityBase::$translatableEntityKeys | protected | property | Holds translatable entity keys such as the label. | ||
| ContentEntityBase::$translationInitialize | protected | property | A flag indicating whether a translation object is being initialized. | ||
| ContentEntityBase::$translations | protected | property | An array of entity translation metadata. | ||
| ContentEntityBase::$validated | protected | property | Whether entity validation was performed. | ||
| ContentEntityBase::$validationRequired | protected | property | Whether entity validation is required before saving the entity. | ||
| ContentEntityBase::$values | protected | property | The plain data values of the contained fields. | ||
| ContentEntityBase::addTranslation | public | function | |||
| ContentEntityBase::bundle | public | function | |||
| ContentEntityBase::bundleFieldDefinitions | public static | function | |||
| ContentEntityBase::clearTranslationCache | protected | function | Clears entity translation object cache to remove stale references. | ||
| ContentEntityBase::create | public static | function | |||
| ContentEntityBase::createDuplicate | public | function | |||
| ContentEntityBase::get | public | function | |||
| ContentEntityBase::getBundleEntity | public | function | |||
| ContentEntityBase::getEntityKey | protected | function | Gets the value of the given entity key, if defined. | ||
| ContentEntityBase::getFieldDefinition | public | function | |||
| ContentEntityBase::getFieldDefinitions | public | function | |||
| ContentEntityBase::getFields | public | function | |||
| ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck | protected | function | Returns an array of field names to skip in ::hasTranslationChanges. | ||
| ContentEntityBase::getIterator | public | function | Retrieves the iterator for the object. | ||
| ContentEntityBase::getLanguages | protected | function | |||
| ContentEntityBase::getLoadedRevisionId | public | function | |||
| ContentEntityBase::getRevisionId | public | function | |||
| ContentEntityBase::getTranslatableFields | public | function | |||
| ContentEntityBase::getTranslatedField | protected | function | Gets a translated field. | ||
| ContentEntityBase::getTranslation | public | function | |||
| ContentEntityBase::getTranslationLanguages | public | function | |||
| ContentEntityBase::getTranslationStatus | public | function | |||
| ContentEntityBase::getUntranslated | public | function | |||
| ContentEntityBase::hasField | public | function | |||
| ContentEntityBase::hasTranslation | public | function | |||
| ContentEntityBase::hasTranslationChanges | public | function | |||
| ContentEntityBase::id | public | function | |||
| ContentEntityBase::initializeTranslation | protected | function | Instantiates a translation object for an existing translation. | ||
| ContentEntityBase::isDefaultRevision | public | function | |||
| ContentEntityBase::isDefaultTranslation | public | function | |||
| ContentEntityBase::isDefaultTranslationAffectedOnly | public | function | |||
| ContentEntityBase::isLatestRevision | public | function | |||
| ContentEntityBase::isLatestTranslationAffectedRevision | public | function | |||
| ContentEntityBase::isNewRevision | public | function | |||
| ContentEntityBase::isNewTranslation | public | function | |||
| ContentEntityBase::isRevisionTranslationAffected | public | function | |||
| ContentEntityBase::isRevisionTranslationAffectedEnforced | public | function | |||
| ContentEntityBase::isTranslatable | public | function | |||
| ContentEntityBase::isValidationRequired | public | function | |||
| ContentEntityBase::label | public | function | |||
| ContentEntityBase::language | public | function | |||
| ContentEntityBase::onChange | public | function | |||
| ContentEntityBase::postCreate | public | function | |||
| ContentEntityBase::referencedEntities | public | function | |||
| ContentEntityBase::removeTranslation | public | function | |||
| ContentEntityBase::set | public | function | |||
| ContentEntityBase::setDefaultLangcode | protected | function | Populates the local cache for the default language code. | ||
| ContentEntityBase::setDefaultTranslationEnforced | public | function | Set or clear an override of the isDefaultTranslation() result. | ||
| ContentEntityBase::setNewRevision | public | function | |||
| ContentEntityBase::setRevisionTranslationAffected | public | function | |||
| ContentEntityBase::setRevisionTranslationAffectedEnforced | public | function | |||
| ContentEntityBase::setValidationRequired | public | function | |||
| ContentEntityBase::toArray | public | function | |||
| ContentEntityBase::updateFieldLangcodes | protected | function | Updates language for already instantiated fields. | ||
| ContentEntityBase::updateLoadedRevisionId | public | function | |||
| ContentEntityBase::updateOriginalValues | public | function | Updates the original values with the interim changes. | ||
| ContentEntityBase::uuid | public | function | |||
| ContentEntityBase::validate | public | function | |||
| ContentEntityBase::wasDefaultRevision | public | function | |||
| ContentEntityBase::__clone | public | function | Magic method: Implements a deep clone. | ||
| ContentEntityBase::__construct | public | function | |||
| ContentEntityBase::__get | public | function | Implements the magic method for getting object properties. | ||
| ContentEntityBase::__isset | public | function | Implements the magic method for isset(). | ||
| ContentEntityBase::__set | public | function | Implements the magic method for setting object properties. | ||
| ContentEntityBase::__sleep | public | function | |||
| ContentEntityBase::__unset | public | function | Implements the magic method for unset(). | ||
| DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | ||
| DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | ||
| DependencySerializationTrait::__sleep | public | function | Aliased as: traitSleep | ||
| DependencySerializationTrait::__wakeup | public | function | |||
| EntityBase::$enforceIsNew | protected | property | Boolean indicating whether the entity should be forced to be new. | ||
| EntityBase::$entityTypeId | protected | property | The entity type. | ||
| EntityBase::$originalEntity | protected | property | The original unchanged entity. | ||
| EntityBase::$typedData | protected | property | A typed data object wrapping this entity. | ||
| EntityBase::delete | public | function | |||
| EntityBase::enforceIsNew | public | function | |||
| EntityBase::entityTypeBundleInfo | protected | function | Gets the entity type bundle info service. | ||
| EntityBase::entityTypeManager | protected | function | Gets the entity type manager. | ||
| EntityBase::getCacheContexts | public | function | |||
| EntityBase::getCacheMaxAge | public | function | |||
| EntityBase::getCacheTags | public | function | |||
| EntityBase::getCacheTagsToInvalidate | public | function | |||
| EntityBase::getConfigDependencyKey | public | function | |||
| EntityBase::getConfigDependencyName | public | function | |||
| EntityBase::getConfigTarget | public | function | |||
| EntityBase::getEntityTypeId | public | function | |||
| EntityBase::getListCacheTagsToInvalidate | protected | function | The list cache tags to invalidate for this entity. | ||
| EntityBase::getOriginal | public | function | |||
| EntityBase::getOriginalId | public | function | |||
| EntityBase::getTypedData | public | function | |||
| EntityBase::getTypedDataClass | private | function | Returns the typed data class name for this entity. | ||
| EntityBase::hasLinkTemplate | public | function | |||
| EntityBase::invalidateTagsOnDelete | protected static | function | Invalidates an entity's cache tags upon delete. | ||
| EntityBase::invalidateTagsOnSave | protected | function | Invalidates an entity's cache tags upon save. | ||
| EntityBase::isNew | public | function | |||
| EntityBase::languageManager | protected | function | Gets the language manager. | ||
| EntityBase::linkTemplates | protected | function | Gets an array link templates. | ||
| EntityBase::load | public static | function | |||
| EntityBase::loadMultiple | public static | function | |||
| EntityBase::postLoad | public static | function | |||
| EntityBase::preCreate | public static | function | |||
| EntityBase::save | public | function | |||
| EntityBase::setOriginal | public | function | |||
| EntityBase::setOriginalId | public | function | |||
| EntityBase::toLink | public | function | |||
| EntityBase::toUrl | public | function | |||
| EntityBase::uriRelationships | public | function | |||
| EntityBase::urlRouteParameters | protected | function | Gets an array of placeholders for this entity. | ||
| EntityBase::uuidGenerator | protected | function | Gets the UUID generator. | ||
| EntityChangedTrait::getChangedTime | public | function | Gets the timestamp of the last entity change for the current translation. | ||
| EntityChangedTrait::getChangedTimeAcrossTranslations | public | function | Returns the timestamp of the last entity change across all translations. | ||
| EntityChangedTrait::setChangedTime | public | function | Sets the timestamp of the last entity change for the current translation. | ||
| EntityChangesDetectionTrait::getFieldsToSkipFromTranslationChangesCheck | protected | function | Returns an array of field names to skip when checking for changes. | Aliased as: traitGetFieldsToSkipFromTranslationChangesCheck | |
| EntityOwnerTrait::getDefaultEntityOwner | public static | function | Default value callback for 'owner' base field. | ||
| EntityOwnerTrait::getOwner | public | function | |||
| EntityOwnerTrait::getOwnerId | public | function | |||
| EntityOwnerTrait::ownerBaseFieldDefinitions | public static | function | Returns an array of base field definitions for entity owners. | ||
| EntityOwnerTrait::setOwner | public | function | |||
| EntityOwnerTrait::setOwnerId | public | function | |||
| EntityPublishedTrait::isPublished | public | function | |||
| EntityPublishedTrait::publishedBaseFieldDefinitions | public static | function | Returns an array of base field definitions for publishing status. | ||
| EntityPublishedTrait::setPublished | public | function | |||
| EntityPublishedTrait::setUnpublished | public | function | |||
| Node::$in_preview | public | property | Whether the node is being previewed or not. | ||
| Node::access | public | function | Checks data value access. | Overrides ContentEntityBase::access | |
| Node::baseFieldDefinitions | public static | function | Provides base field definitions for an entity type. | Overrides EditorialContentEntityBase::baseFieldDefinitions | |
| Node::getCreatedTime | public | function | Gets the node creation timestamp. | Overrides NodeInterface::getCreatedTime | |
| Node::getTitle | public | function | Gets the node title. | Overrides NodeInterface::getTitle | |
| Node::getType | public | function | Gets the node type. | Overrides NodeInterface::getType | |
| Node::isPromoted | public | function | Returns the node promotion status. | Overrides NodeInterface::isPromoted | |
| Node::isSticky | public | function | Returns the node sticky status. | Overrides NodeInterface::isSticky | |
| Node::postDelete | public static | function | Acts on deleted entities before the delete hook is invoked. | Overrides EntityBase::postDelete | |
| Node::postSave | public | function | Acts on a saved entity before the insert or update hook is invoked. | Overrides ContentEntityBase::postSave | |
| Node::preDelete | public static | function | Acts on entities before they are deleted and before hooks are invoked. | Overrides EntityBase::preDelete | |
| Node::preSave | public | function | Acts on an entity before the presave hook is invoked. | Overrides ContentEntityBase::preSave | |
| Node::preSaveRevision | public | function | Acts on a revision before it gets saved. | Overrides ContentEntityBase::preSaveRevision | |
| Node::setCreatedTime | public | function | Sets the node creation timestamp. | Overrides NodeInterface::setCreatedTime | |
| Node::setPromoted | public | function | Sets the node promoted status. | Overrides NodeInterface::setPromoted | |
| Node::setSticky | public | function | Sets the node sticky status. | Overrides NodeInterface::setSticky | |
| Node::setTitle | public | function | Sets the node title. | Overrides NodeInterface::setTitle | |
| NodeInterface::NOT_PROMOTED | constant | Denotes that the node is not promoted to the front page. | |||
| NodeInterface::NOT_PUBLISHED | constant | Denotes that the node is not published. | |||
| NodeInterface::NOT_STICKY | constant | Denotes that the node is not sticky at the top of the page. | |||
| NodeInterface::PROMOTED | constant | Denotes that the node is promoted to the front page. | |||
| NodeInterface::PUBLISHED | constant | Denotes that the node is published. | |||
| NodeInterface::STICKY | constant | Denotes that the node is sticky at the top of the page. | |||
| RefinableCacheableDependencyTrait::addCacheableDependency | public | function | |||
| RefinableCacheableDependencyTrait::addCacheContexts | public | function | |||
| RefinableCacheableDependencyTrait::addCacheTags | public | function | |||
| RefinableCacheableDependencyTrait::mergeCacheMaxAge | public | function | |||
| RevisionLogEntityTrait::getEntityType | abstract public | function | Gets the entity type definition. | ||
| RevisionLogEntityTrait::getRevisionCreationTime | public | function | |||
| RevisionLogEntityTrait::getRevisionLogMessage | public | function | |||
| RevisionLogEntityTrait::getRevisionUser | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser(). | ||
| RevisionLogEntityTrait::getRevisionUserId | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUserId(). | ||
| RevisionLogEntityTrait::revisionLogBaseFieldDefinitions | public static | function | Provides revision-related base field definitions for an entity type. | ||
| RevisionLogEntityTrait::setRevisionCreationTime | public | function | |||
| RevisionLogEntityTrait::setRevisionLogMessage | public | function | |||
| RevisionLogEntityTrait::setRevisionUser | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser(). | ||
| RevisionLogEntityTrait::setRevisionUserId | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId(). | ||
| SynchronizableEntityTrait::$isSyncing | protected | property | Is entity being created updated or deleted through synchronization process. | ||
| SynchronizableEntityTrait::isSyncing | public | function | |||
| SynchronizableEntityTrait::setSyncing | public | function | |||
| TranslationStatusInterface::TRANSLATION_CREATED | constant | Status code identifying a newly created translation. | |||
| TranslationStatusInterface::TRANSLATION_EXISTING | constant | Status code identifying an existing translation. | |||
| TranslationStatusInterface::TRANSLATION_REMOVED | constant | Status code identifying a removed translation. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.