class Node
Same name in this branch
- 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
Same name in other branches
- 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
- 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
Defines the node entity class.
Plugin annotation
@ContentEntityType(
id = "node",
label = @Translation("Content"),
label_collection = @Translation("Content"),
label_singular = @Translation("content item"),
label_plural = @Translation("content items"),
label_count = @PluralTranslation(
singular = "@count content item",
plural = "@count content items"
),
bundle_label = @Translation("Content type"),
handlers = {
"storage" = "Drupal\node\NodeStorage",
"storage_schema" = "Drupal\node\NodeStorageSchema",
"view_builder" = "Drupal\node\NodeViewBuilder",
"access" = "Drupal\node\NodeAccessControlHandler",
"views_data" = "Drupal\node\NodeViewsData",
"form" = {
"default" = "Drupal\node\NodeForm",
"delete" = "Drupal\node\Form\NodeDeleteForm",
"edit" = "Drupal\node\NodeForm",
"delete-multiple-confirm" = "Drupal\node\Form\DeleteMultiple"
},
"route_provider" = {
"html" = "Drupal\node\Entity\NodeRouteProvider",
},
"list_builder" = "Drupal\node\NodeListBuilder",
"translation" = "Drupal\node\NodeTranslationHandler"
},
base_table = "node",
data_table = "node_field_data",
revision_table = "node_revision",
revision_data_table = "node_field_revision",
show_revision_ui = TRUE,
translatable = TRUE,
list_cache_contexts = { "user.node_grants:view" },
entity_keys = {
"id" = "nid",
"revision" = "vid",
"bundle" = "type",
"label" = "title",
"langcode" = "langcode",
"uuid" = "uuid",
"status" = "status",
"published" = "status",
"uid" = "uid",
"owner" = "uid",
},
revision_metadata_keys = {
"revision_user" = "revision_uid",
"revision_created" = "revision_timestamp",
"revision_log_message" = "revision_log"
},
bundle_entity_type = "node_type",
field_ui_base_route = "entity.node_type.edit_form",
common_reference_target = TRUE,
permission_granularity = "bundle",
collection_permission = "access content overview",
links = {
"canonical" = "/node/{node}",
"delete-form" = "/node/{node}/delete",
"delete-multiple-form" = "/admin/content/node/delete",
"edit-form" = "/node/{node}/edit",
"version-history" = "/node/{node}/revisions",
"revision" = "/node/{node}/revisions/{node_revision}/view",
"create" = "/node",
}
)
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 extends \Drupal\Core\Entity\EntityBase implements \Drupal\Core\Entity\IteratorAggregate, \Drupal\Core\Entity\ContentEntityInterface, \Drupal\Core\TypedData\TranslationStatusInterface uses \Drupal\Core\Entity\EntityChangesDetectionTrait, \Drupal\Core\Entity\SynchronizableEntityTrait
- class \Drupal\Core\Entity\EditorialContentEntityBase extends \Drupal\Core\Entity\ContentEntityBase 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
- class \Drupal\node\Entity\Node extends \Drupal\Core\Entity\EditorialContentEntityBase implements \Drupal\node\NodeInterface uses \Drupal\user\EntityOwnerTrait
- class \Drupal\Core\Entity\EditorialContentEntityBase extends \Drupal\Core\Entity\ContentEntityBase 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
- class \Drupal\Core\Entity\ContentEntityBase extends \Drupal\Core\Entity\EntityBase implements \Drupal\Core\Entity\IteratorAggregate, \Drupal\Core\Entity\ContentEntityInterface, \Drupal\Core\TypedData\TranslationStatusInterface uses \Drupal\Core\Entity\EntityChangesDetectionTrait, \Drupal\Core\Entity\SynchronizableEntityTrait
Expanded class hierarchy of Node
201 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
1519 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
- 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
- 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
- AccessPermissionTest::setUp in core/
modules/ user/ tests/ src/ Kernel/ Views/ AccessPermissionTest.php - AddFeedTest::testFeedIconEscaping in core/
modules/ system/ tests/ src/ Kernel/ Common/ AddFeedTest.php - Checks that special characters are correctly escaped.
File
-
core/
modules/ node/ src/ Entity/ Node.php, line 85
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() && isset($this->original) && (!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->original->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);
}
// Reindex the node when it is updated. The node is automatically indexed
// when it is added, simply by being added to the node table.
if ($update) {
node_reindex_node_search($this->id());
}
}
/**
* {@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(TRUE)
->setDisplayOptions('form', [
'type' => 'boolean_checkbox',
'settings' => [
'display_label' => TRUE,
],
'weight' => 15,
])
->setDisplayConfigurable('form', TRUE);
$fields['sticky'] = BaseFieldDefinition::create('boolean')->setLabel(t('Sticky at top of lists'))
->setRevisionable(TRUE)
->setTranslatable(TRUE)
->setDefaultValue(FALSE)
->setDisplayOptions('form', [
'type' => 'boolean_checkbox',
'settings' => [
'display_label' => TRUE,
],
'weight' => 16,
])
->setDisplayConfigurable('form', TRUE);
return $fields;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Member alias | Overriden Title | Overrides |
---|---|---|---|---|---|---|
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 | Overrides EntityBase::bundle | |||
ContentEntityBase::bundleFieldDefinitions | public static | function | 5 | |||
ContentEntityBase::clearTranslationCache | protected | function | Clears entity translation object cache to remove stale references. | |||
ContentEntityBase::create | public static | function | Overrides EntityBase::create | |||
ContentEntityBase::createDuplicate | public | function | Overrides EntityBase::createDuplicate | 1 | ||
ContentEntityBase::get | public | function | ||||
ContentEntityBase::getEntityKey | protected | function | Gets the value of the given entity key, if defined. | 1 | ||
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. | 1 | ||
ContentEntityBase::getIterator | public | function | ||||
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 | Overrides TranslationStatusInterface::getTranslationStatus | |||
ContentEntityBase::getUntranslated | public | function | ||||
ContentEntityBase::hasField | public | function | ||||
ContentEntityBase::hasTranslation | public | function | ||||
ContentEntityBase::hasTranslationChanges | public | function | ||||
ContentEntityBase::id | public | function | Overrides EntityBase::id | |||
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 | Overrides EntityBase::label | 4 | ||
ContentEntityBase::language | public | function | Overrides EntityBase::language | |||
ContentEntityBase::onChange | public | function | ||||
ContentEntityBase::postCreate | public | function | Overrides EntityBase::postCreate | 1 | ||
ContentEntityBase::referencedEntities | public | function | Overrides EntityBase::referencedEntities | 1 | ||
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 | Overrides EntityBase::toArray | |||
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 | Overrides EntityBase::uuid | |||
ContentEntityBase::validate | public | function | 1 | |||
ContentEntityBase::wasDefaultRevision | public | function | ||||
ContentEntityBase::__clone | public | function | Magic method: Implements a deep clone. | |||
ContentEntityBase::__construct | public | function | Overrides EntityBase::__construct | |||
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 | Overrides EntityBase::__sleep | |||
ContentEntityBase::__unset | public | function | Implements the magic method for unset(). | |||
DependencySerializationTrait::$_entityStorages | protected | property | ||||
DependencySerializationTrait::$_serviceIds | protected | property | ||||
DependencySerializationTrait::__sleep | public | function | Aliased as: traitSleep | 1 | ||
DependencySerializationTrait::__wakeup | public | function | 2 | |||
EntityBase::$enforceIsNew | protected | property | Boolean indicating whether the entity should be forced to be new. | |||
EntityBase::$entityTypeId | protected | property | The entity type. | |||
EntityBase::$typedData | protected | property | A typed data object wrapping this entity. | |||
EntityBase::delete | public | function | Overrides EntityInterface::delete | 1 | ||
EntityBase::enforceIsNew | public | function | Overrides EntityInterface::enforceIsNew | |||
EntityBase::entityTypeBundleInfo | protected | function | Gets the entity type bundle info service. | |||
EntityBase::entityTypeManager | protected | function | Gets the entity type manager. | |||
EntityBase::getCacheContexts | public | function | Overrides CacheableDependencyTrait::getCacheContexts | |||
EntityBase::getCacheMaxAge | public | function | Overrides CacheableDependencyTrait::getCacheMaxAge | |||
EntityBase::getCacheTags | public | function | Overrides CacheableDependencyTrait::getCacheTags | |||
EntityBase::getCacheTagsToInvalidate | public | function | Overrides EntityInterface::getCacheTagsToInvalidate | 3 | ||
EntityBase::getConfigDependencyKey | public | function | Overrides EntityInterface::getConfigDependencyKey | |||
EntityBase::getConfigDependencyName | public | function | Overrides EntityInterface::getConfigDependencyName | 1 | ||
EntityBase::getConfigTarget | public | function | Overrides EntityInterface::getConfigTarget | 1 | ||
EntityBase::getEntityTypeId | public | function | Overrides EntityInterface::getEntityTypeId | |||
EntityBase::getListCacheTagsToInvalidate | protected | function | The list cache tags to invalidate for this entity. | |||
EntityBase::getOriginalId | public | function | Overrides EntityInterface::getOriginalId | 1 | ||
EntityBase::getTypedData | public | function | Overrides EntityInterface::getTypedData | |||
EntityBase::getTypedDataClass | private | function | Returns the typed data class name for this entity. | |||
EntityBase::hasLinkTemplate | public | function | Overrides EntityInterface::hasLinkTemplate | |||
EntityBase::invalidateTagsOnDelete | protected static | function | Invalidates an entity's cache tags upon delete. | 1 | ||
EntityBase::invalidateTagsOnSave | protected | function | Invalidates an entity's cache tags upon save. | 2 | ||
EntityBase::isNew | public | function | Overrides EntityInterface::isNew | 2 | ||
EntityBase::languageManager | protected | function | Gets the language manager. | |||
EntityBase::linkTemplates | protected | function | Gets an array link templates. | 1 | ||
EntityBase::load | public static | function | Overrides EntityInterface::load | |||
EntityBase::loadMultiple | public static | function | Overrides EntityInterface::loadMultiple | |||
EntityBase::postLoad | public static | function | Overrides EntityInterface::postLoad | 3 | ||
EntityBase::preCreate | public static | function | Overrides EntityInterface::preCreate | 6 | ||
EntityBase::save | public | function | Overrides EntityInterface::save | 3 | ||
EntityBase::setOriginalId | public | function | Overrides EntityInterface::setOriginalId | 1 | ||
EntityBase::toLink | public | function | Overrides EntityInterface::toLink | |||
EntityBase::toUrl | public | function | Overrides EntityInterface::toUrl | 2 | ||
EntityBase::uriRelationships | public | function | Overrides EntityInterface::uriRelationships | |||
EntityBase::urlRouteParameters | protected | function | Gets an array of placeholders for this entity. | 2 | ||
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. | 1 | ||
EntityOwnerTrait::getOwner | public | function | 1 | |||
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 | ||||
Node::access | public | function | Overrides ContentEntityBase::access | |||
Node::baseFieldDefinitions | public static | function | Overrides EditorialContentEntityBase::baseFieldDefinitions | |||
Node::getCreatedTime | public | function | Overrides NodeInterface::getCreatedTime | |||
Node::getTitle | public | function | Overrides NodeInterface::getTitle | |||
Node::getType | public | function | Overrides NodeInterface::getType | |||
Node::isPromoted | public | function | Overrides NodeInterface::isPromoted | |||
Node::isSticky | public | function | Overrides NodeInterface::isSticky | |||
Node::postDelete | public static | function | Overrides EntityBase::postDelete | |||
Node::postSave | public | function | Overrides ContentEntityBase::postSave | |||
Node::preDelete | public static | function | Overrides EntityBase::preDelete | |||
Node::preSave | public | function | Overrides ContentEntityBase::preSave | |||
Node::preSaveRevision | public | function | Overrides ContentEntityBase::preSaveRevision | |||
Node::setCreatedTime | public | function | Overrides NodeInterface::setCreatedTime | |||
Node::setPromoted | public | function | Overrides NodeInterface::setPromoted | |||
Node::setSticky | public | function | Overrides NodeInterface::setSticky | |||
Node::setTitle | public | function | 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 | 1 | |||
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 | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime(). | |||
RevisionLogEntityTrait::getRevisionLogMessage | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage(). | |||
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 | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime(). | |||
RevisionLogEntityTrait::setRevisionLogMessage | public | function | Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage(). | |||
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.