Drupal 8  8.0.2
Entity Class Reference
Inheritance diagram for Entity:

Public Member Functions

 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 

Static Public Member Functions

static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 

Protected Member Functions

 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 

Static Protected Member Functions

static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Protected Attributes

 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Detailed Description

Defines a base entity class.

Constructor & Destructor Documentation

__construct ( array  $values,
  $entity_type 
)

Constructs an Entity object.

Parameters
array$valuesAn array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
string$entity_typeThe type of the entity to create.

Member Function Documentation

__sleep ( )

{}

access (   $operation,
AccountInterface  $account = NULL,
  $return_as_object = FALSE 
)

{Checks data value access.

Parameters
string$operationThe operation to be performed.
\Drupal\Core\Session\AccountInterface$account(optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL.
bool$return_as_object(optional) Defaults to FALSE.
Returns
bool| The access result. Returns a boolean if $return_as_object is FALSE (this is the default) and otherwise an AccessResultInterface object. When a boolean is returned, the result of AccessInterface::isAllowed() is returned, i.e. TRUE means access is explicitly allowed, FALSE means access is either explicitly forbidden or "no opinion".
}

Implements AccessibleInterface.

References Entity\bundle(), and Entity\entityManager().

Here is the call graph for this function:

bundle ( )

{Gets the bundle of the entity.

Returns
string The bundle of the entity. Defaults to the entity type ID if the entity type does not make use of different bundles.
}

Implements EntityInterface.

Referenced by Entity\access(), RdfMapping\calculateDependencies(), EntityDisplayBase\calculateDependencies(), EntityDisplayBase\getFieldDefinitions(), EntityDisplayBase\getHighestWeight(), FieldConfigBase\id(), EntityDisplayBase\id(), EntityDisplayBase\init(), FieldConfig\preSave(), BaseFieldOverride\preSave(), EntityFormDisplay\processForm(), and Entity\toUrl().

Here is the caller graph for this function:

static create ( array  $values = array())
static

{Constructs a new entity object, without permanently saving it.

Parameters
array$values(optional) An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
Returns
static The entity object.
}

Implements EntityInterface.

References Drupal\entityManager().

Referenced by RenderCacheIntegrationTest\assertCacheTagsForEntityBasedView(), EntityFieldRenderer\buildFields(), ProfileValues\buildMigrations(), Node\buildMigrations(), CckMigration\buildMigrations(), User\buildMigrations(), TermNode\buildMigrations(), ViewUI\create(), CommentTestBase\createCommentType(), FeedCacheTagsTest\createEntity(), ItemCacheTagsTest\createEntity(), ShortcutCacheTagsTest\createEntity(), EntityUrlLanguageTest\createTranslatableEntity(), LanguageNegotiationContentEntityTest\createTranslatableEntity(), MigrateFieldInstanceTest\createType(), BlockXssTest\doBlockContentTest(), BlockXssTest\doMenuTest(), FrontPageTest\doTestFrontPageViewCacheTags(), BlockXssTest\doViewTest(), ImageItem\generateSampleValue(), ShortcutTestBase\generateShortcutSet(), NodeRouteContext\getRuntimeContexts(), BuilderBase\getSourcePlugin(), TermNode\getVocabularyIdMap(), ContentLanguageSettings\loadByEntityTypeBundle(), OptionsTestBase\mockStandardInstall(), MigrateNodeTestBase\setUp(), MigrateNodeBundleSettingsTest\setUp(), MigrateUploadTest\setUp(), EntityContentBaseTest\setUp(), MigrateUserTest\setUp(), MigrateNodeStubTest\setUp(), CKEditorToolbarButtonTest\setUp(), MigrateCommentStubTest\setUp(), CommentRssTest\setUp(), FeedLanguageTest\setUp(), ManageDisplayTest\setUp(), FileEntityFormatterTest\setUp(), MigrateNodeTaxonomyTest\setUp(), ExtensionViewsFieldTest\setUp(), StyleSummaryTest\setUp(), CommentUserNameTest\setUp(), MigrateFieldFormatterSettingsTest\setUp(), FileItemValidationTest\setUp(), EditorImageDialogTest\setUp(), TextFormatElementFormTest\setUp(), FieldFieldAccessTestBase\setUp(), ConditionTestDualUserTest\setUp(), LanguageNegotiationContentEntityTest\setUp(), NodeRevisionsTest\setUp(), BooleanFormatterSettingsTest\setUp(), TwigWhiteListTest\setUp(), CommentFieldNameTest\setUp(), MigrateMessageTest\setUp(), EntityAutocompleteElementFormTest\setUp(), TaxonomyIndexTidUiTest\setUp(), SqlContentEntityStorageSchemaColumnTest\setUp(), RowEntityRenderersTest\setUp(), EntityReferenceSettingsTest\setUp(), TimestampFormatterTest\setUp(), BooleanFormatterTest\setUp(), RawStringFormatterTest\setUp(), StringFormatterTest\setUp(), ExternalFormUrlTest\setUp(), UserRoleConditionTest\setUp(), NormalizerTestBase\setUp(), ManageFieldsTest\setUp(), FieldGroupRowsWebTest\setUp(), EntityReferenceItemTest\setUp(), FieldFieldTest\setUp(), TranslationTest\setUp(), QueueSerializationTest\setUp(), DbLogFormInjectionTest\setUp(), SystemMenuBlockTest\setUp(), DbDumpTest\setUp(), AreaEntityTest\setUpFixtures(), FieldEntityLinkTest\setUpFixtures(), RowRenderCacheTest\setUpFixtures(), NodeFieldAccessTest\testAccessToAdministrativeFields(), CommentFieldAccessTest\testAccessToAdministrativeFields(), UserPermissionsTest\testAdministratorRole(), AggregatorFeedViewsFieldAccessTest\testAggregatorFeedFields(), AggregatorItemViewsFieldAccessTest\testAggregatorItemFields(), StatisticsAttachedTest\testAttached(), EntityReferenceItemTest\testAutocreateValidation(), CommentInterfaceTest\testAutoFilledHtmlSubject(), EntityReferenceAdminTest\testAvailableFormatters(), EntityFormDisplayTest\testBaseFieldComponent(), EntityDisplayTest\testBaseFieldComponent(), EntityQueryTest\testBaseFieldMultipleColumns(), BlockConfigSchemaTest\testBlockConfigSchema(), RevisionRelationshipsTest\testBlockContentRevisionRelationship(), BlockTest\testBlockUserRoleDelete(), BookUninstallTest\testBookUninstall(), BooleanFieldTest\testBooleanField(), BooleanFormatterTest\testBooleanFormatter(), CacheTest\testCacheData(), MigrationTest\testCalculateDependencies(), EntityQueryTest\testCaseSensitivity(), CommentCacheTagsTest\testCommentEntity(), CommentFieldsTest\testCommentFieldCreate(), MigrateCommentVariableInstanceTest\testCommentFieldInstance(), CommentStringIdEntitiesTest\testCommentFieldNonStringId(), CommentViewsFieldAccessTest\testCommentFields(), CommentTypeTest\testCommentTypeDeletion(), FieldSettingsTest\testConfigurableFieldSettings(), FieldSettingsTest\testConfigurableFieldStorageSettings(), QuickEditLoadingTest\testContentBlock(), EntityReferenceItemTest\testContentEntityReferenceItemWithStringId(), ContextPluginTest\testContext(), CreateTest\testCreateComment(), CreateTest\testCreateEntityTest(), FieldCrudTest\testCreateFieldCustomStorage(), CreateTest\testCreateNode(), CreateTest\testCreateResourceRestApiNotEnabled(), CreateTest\testCreateUser(), CreateTest\testCreateWithoutPermission(), LanguageConfigurationElementTest\testDefaultLangcode(), ManageFieldsTest\testDefaultValue(), EntityDisplayTest\testDeleteBundle(), EntityFormDisplayTest\testDeleteField(), EntityDisplayTest\testDeleteField(), ContentEntityNullStorageTest\testDeleteThroughImport(), HandlerFilterRolesTest\testDependencies(), FilterAdminTest\testDisabledFormat(), EditorAdminTest\testDisableFormatWithEditor(), EntityReferenceItemTest\testEntityAutoCreate(), ItemWithoutFeedTest\testEntityCreation(), ItemCacheTagsTest\testEntityCreation(), EntityDisplayTest\testEntityDisplayCRUD(), EntityDisplayTest\testEntityDisplayCRUDSort(), EntityDisplayTest\testEntityDisplayInvalidateCacheTags(), FieldWidgetConstraintValidatorTest\testEntityLevelConstraintValidation(), EntityAccessControlHandlerTest\testEntityTranslationAccess(), CKEditorAdminTest\testExistingFormat(), ExposedFormTest\testExposedSortAndItemsPerPage(), EntityDisplayTest\testExtraFieldComponent(), EntityReferenceAdminTest\testFieldAdminHandler(), EntityFormDisplayTest\testFieldComponent(), EntityDisplayTest\testFieldComponent(), ConfigTranslationUiTest\testFieldConfigTranslation(), ContentEntityCloneTest\testFieldEntityReferenceAfterClone(), NodeBodyFieldStorageTest\testFieldOverrides(), FieldUIRouteTest\testFieldUIRoutes(), FieldUpdateTest\testFieldUpdate8002(), FileManagedAccessTest\testFileAccess(), FileViewsFieldAccessTest\testFileFields(), FileItemValidationTest\testFileValidationConstraint(), UserNameFormatterTest\testFormatter(), FileEntityFormatterTest\testFormatterFileExtension(), FileEntityFormatterTest\testFormatterFileLink(), FileEntityFormatterTest\testFormatterFileMime(), FileEntityFormatterTest\testFormatterFileSize(), FileEntityFormatterTest\testFormatterFileUri(), LocaleConfigManagerTest\testGetDefaultConfigLangcode(), EntityDisplayTest\testGetDisplayModeOptions(), QueryGroupByTest\testGroupByFieldWithCardinality(), HandlerTest\testHandlerHelpEscaping(), ManageFieldsTest\testHelpDescriptions(), ManageFieldsTest\testHiddenFields(), MenuLinkTest\testHierarchicalMenuLinkVisibility(), QuickEditLoadingTest\testImageField(), ImageImportTest\testImport(), LanguageSelectElementTest\testLanguageSelectElementOptions(), LanguageSwitchingTest\testLanguageSessionSwitchLinks(), LanguageListTest\testLanguageStates(), CommentLinksTest\testLinkReply(), ManageFieldsTest\testLockedField(), MenuLinkSecurityTest\testMenuLink(), FieldFieldTest\testMissingBundleFieldRender(), UpdateApiEntityDefinitionUpdateTest\testMultipleUpdates(), EntityRevisionTranslationTest\testNewRevisionAfterTranslation(), NidArgumentTest\testNidArgument(), PathNoCanonicalLinkTest\testNoCanonicalLinkTemplate(), MigrateNodeBundleSettingsTest\testNodeBundleSettings(), FileFieldDisplayTest\testNodeDisplay(), NodeViewsFieldAccessTest\testNodeFields(), ManageDisplayTest\testNoFieldsDisplayOverview(), EntityFormDisplayTest\testOnDependencyRemoval(), EntityDisplayTest\testOnDependencyRemoval(), NodeOwnerTest\testOwner(), PageCacheTest\testPageCacheAnonymous403404(), MigrateSkipRowTest\testPrepareRowSkip(), HandlerTest\testRelationshipUI(), FileViewsDataTest\testRelationshipViewsData(), ImageViewsDataTest\testRelationshipViewsData(), ReportFieldsTest\testReportFields(), UserPasswordResetTest\testResetImpersonation(), EntityRevisionTranslationTest\testRevertRevisionAfterTranslation(), UserRoleDeleteTest\testRoleDeleteUserRoleReferenceDelete(), FieldItemTest\testSaveWorkflow(), EntityReferenceItemTest\testSelectionHandlerSettings(), TermEntityReferenceTest\testSelectionTestVocabularyRestriction(), MigrationTest\testSetInvalidation(), UpdateApiEntityDefinitionUpdateTest\testSingleUpdates(), EntityReferenceSelectionSortTest\testSort(), MigrateStatusTest\testStatus(), UpdateApiEntityDefinitionUpdateTest\testStatusReport(), StringFormatterTest\testStringFormatter(), RawStringFormatterTest\testStringFormatter(), MigrateTaxonomyTermStubTest\testStub(), MigrateBlockContentStubTest\testStubSuccess(), TaxonomyViewsFieldAccessTest\testTermFields(), EditorFilterIntegrationTest\testTextFormatIntegration(), TimestampFormatterTest\testTimestampAgoFormatter(), TimestampFormatterTest\testTimestampFormatter(), MenuLinkContentTranslationUITest\testTranslationLinkOnMenuEditForm(), FieldEntityTranslationTest\testTranslationRows(), UnpublishByKeywordActionTest\testUnpublishByKeywordAction(), BlockContextMappingUpdateTest\testUpdateHookN(), UriItemTest\testUriField(), UserFieldsTest\testUserFields(), UserEntityTest\testUserMethods(), CommentUserNameTest\testUsername(), UserPermissionsTest\testUserPermissionChanges(), UserSaveStatusTest\testUserSaveStatus(), UserRegistrationTest\testUuidFormState(), UuidFormatterTest\testUuidStringFormatter(), ViewExecutableTest\testValidateNestedLoops(), ForumValidationTest\testValidation(), FeedValidationTest\testValidation(), UserValidationTest\testValidation(), FieldWidgetConstraintValidatorTest\testValidationWithCompositeConstraint(), UserActionConfigSchemaTest\testValidUserActionConfigSchema(), ViewNonTranslatableEntityTest\testViewNoTranslatableEntity(), FieldApiDataTest\testViewsData(), ViewsListTest\testViewsListLimit(), and TwigWhiteListTest\testWhiteListChaining().

Here is the call graph for this function:

createDuplicate ( )

{Creates a duplicate of the entity.

Returns
static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.
}

Implements EntityInterface.

References Entity\getEntityType().

Here is the call graph for this function:

delete ( )

{Deletes an entity permanently.

Exceptions
\Drupal\Core\Entity\EntityStorageExceptionIn case of failures an exception is thrown.
}

Implements EntityInterface.

References Entity\entityManager(), and Entity\isNew().

Here is the call graph for this function:

enforceIsNew (   $value = TRUE)

{Enforces an entity to be new.Allows migrations to create entities with pre-defined IDs by forcing the entity to be new before saving.

Parameters
bool$value(optional) Whether the entity should be forced to be new. Defaults to TRUE.
Returns
$this
See Also
::isNew()
}

Implements EntityInterface.

Referenced by User\isNew(), Entity\isNew(), and ConfigEntityBase\isNew().

Here is the caller graph for this function:

entityManager ( )
protected

Gets the entity manager.

Returns
Deprecated:
in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use ::entityTypeManager() instead in most cases. If the needed method is not on , see the deprecated to find the correct interface or service.

Referenced by EntityDisplayBase\__construct(), Entity\access(), ContentEntityBase\access(), EntityDisplayBase\calculateDependencies(), Entity\delete(), ConfigEntityBundleBase\deleteDisplays(), BaseFieldOverride\getBaseFieldDefinition(), Migration\getEntityManager(), ContentEntityBase\getFieldDefinitions(), FieldConfig\getFieldStorageDefinition(), ContentEntityBase\isTranslatable(), ConfigEntityBundleBase\loadDisplays(), ConfigEntityBundleBase\postSave(), NodeType\postSave(), FieldConfigBase\postSave(), BaseFieldOverride\preSave(), Entity\save(), TestMigration\setEntityManager(), and Entity\toUrl().

Here is the caller graph for this function:

entityTypeManager ( )
protected

Gets the entity type manager.

Returns
getCacheContexts ( )

{The cache contexts associated with this object.These identify a specific variation/representation of the object.Cache contexts are tokens: placeholders that are converted to cache keys by the service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.

Returns
string[] An array of cache context tokens, used to generate a cache ID.
See Also
::convertTokensToKeys()
}

Implements CacheableDependencyInterface.

getCacheMaxAge ( )

{The maximum age for which this object may be cached.

Returns
int The maximum time in seconds that this object may be cached.
}

Implements CacheableDependencyInterface.

getCacheTags ( )

{The cache tags associated with this object.When this object is modified, these cache tags will be invalidated.

Returns
string[] A set of cache tags.
}

Implements CacheableDependencyInterface.

Referenced by View\invalidateCaches().

Here is the caller graph for this function:

getCacheTagsToInvalidate ( )

{Returns the cache tags that should be used to invalidate caches.This will not return additional cache tags added through addCacheTags().

Returns
string[] Set of cache tags.
See Also
::addCacheTags()
::getCacheTags()
}

Implements EntityInterface.

getConfigDependencyKey ( )

{Gets the key that is used to store configuration dependencies.

Returns
string The key to be used in configuration dependencies when storing dependencies on entities of this type.
See Also
::getConfigDependencyKey()
}

Implements EntityInterface.

getConfigDependencyName ( )

{Gets the configuration dependency name.Configuration entities can depend on content and configuration entities. They store an array of content and config dependency names in their "dependencies" key.

Returns
string The configuration dependency name.
See Also
}

Implements EntityInterface.

getConfigTarget ( )

{Gets the configuration target identifier for the entity.Used to supply the correct format for storing a reference targeting this entity in configuration.

Returns
string The configuration target identifier.
}

Implements EntityInterface.

getEntityTypeId ( )

{Gets the ID of the type of the entity.

Returns
string The entity type ID.
}

Implements EntityInterface.

Referenced by Entity\toUrl(), and Entity\urlRouteParameters().

Here is the caller graph for this function:

getOriginalId ( )

{Gets the original ID.

Returns
int|string|null The original ID, or NULL if no ID was set or for entity types that do not support renames.
}

Implements EntityInterface.

getTypedData ( )

{Gets a typed data object for this entity object.The returned typed data object wraps this entity and allows dealing with entities based on the generic typed data API.

Returns
The typed data object for this entity.
See Also
}

Implements EntityInterface.

References Drupal\typedDataManager().

Referenced by ContentEntityBase\validate().

Here is the call graph for this function:

Here is the caller graph for this function:

hasLinkTemplate (   $rel)

{Indicates if a link template exists for a given key.

Parameters
string$keyThe link type.
Returns
bool TRUE if the link template exists, FALSE otherwise.
}

Implements EntityInterface.

References Entity\linkTemplates().

Referenced by Entity\url().

Here is the call graph for this function:

Here is the caller graph for this function:

id ( )

{Gets the identifier.

Returns
string|int|null The entity identifier, or NULL if the object does not yet have an identifier.
}

Implements EntityInterface.

Referenced by ConfigEntityBase\__construct(), ConfigEntityBase\getConfigDependencyName(), ConfigEntityBase\getConfigTarget(), ConfigurableLanguage\getId(), ConfigurableLanguage\isDefault(), SearchPage\isDefaultSearch(), Entity\isNew(), View\label(), ShortcutSet\postSave(), and Entity\urlRouteParameters().

Here is the caller graph for this function:

static invalidateTagsOnDelete ( EntityTypeInterface  $entity_type,
array  $entities 
)
staticprotected

Invalidates an entity's cache tags upon delete.

Parameters
\Drupal\Core\Entity\EntityTypeInterface$entity_typeThe entity type definition.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.

References EntityTypeInterface\getListCacheTags().

Here is the call graph for this function:

invalidateTagsOnSave (   $update)
protected

Invalidates an entity's cache tags upon save.

Parameters
bool$updateTRUE if the entity has been updated, or FALSE if it has been inserted.
isNew ( )

{Determines whether the entity is new.Usually an entity is new if no ID exists for it yet. However, entities may be enforced to be new with existing IDs too.

Returns
bool TRUE if the entity is new, or FALSE if the entity has already been saved.
See Also
::enforceIsNew()
}

Implements EntityInterface.

References Entity\enforceIsNew(), and Entity\id().

Referenced by Entity\delete(), and Comment\preSave().

Here is the call graph for this function:

Here is the caller graph for this function:

label ( )

{Gets the label of the entity.

Returns
string|null The label of the entity, or NULL if there is no label defined.
}

Implements EntityInterface.

References Entity\getEntityType().

Referenced by ConfigTestController\editTitle(), FieldConfigBase\getLabel(), FieldStorageConfig\getLabel(), ConfigurableLanguage\getName(), FieldConfig\postCreate(), FilterFormat\preSave(), FieldConfigBase\setLabel(), ConfigurableLanguage\setName(), and Entity\toLink().

Here is the call graph for this function:

Here is the caller graph for this function:

language ( )

{Gets the language of the entity.

Returns
The language object.
}

Implements EntityInterface.

References Entity\getEntityType(), LanguageInterface\LANGCODE_NOT_SPECIFIED, and Entity\languageManager().

Referenced by Entity\toUrl().

Here is the call graph for this function:

Here is the caller graph for this function:

languageManager ( )
protected

Gets the language manager.

Returns

Referenced by ContentEntityBase\getLanguages(), User\getPreferredAdminLangcode(), User\getPreferredLangcode(), ContentEntityBase\isTranslatable(), Entity\language(), and ContentEntityBase\setDefaultLangcode().

Here is the caller graph for this function:

link (   $text = NULL,
  $rel = 'canonical',
array  $options = [] 
)

{Deprecated way of generating a link to the entity. See toLink().

Parameters
string | null$text(optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL.
string$rel(optional) The link relationship type. Defaults to 'canonical'.
array$optionsSee ::generateFromRoute() for the available options.
Returns
string An HTML string containing a link to the entity.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Please use toLink() instead.
See Also
::toLink
}

Implements EntityInterface.

References Entity\toLink().

Referenced by Shortcut\getUrl(), MenuLinkContent\getUrlObject(), and MenuLinkContent\preSave().

Here is the call graph for this function:

Here is the caller graph for this function:

linkTemplates ( )
protected

Gets an array link templates.

Returns
array An array of link templates containing paths.

References Entity\getEntityType().

Referenced by Entity\hasLinkTemplate(), Entity\toUrl(), and Entity\uriRelationships().

Here is the call graph for this function:

Here is the caller graph for this function:

static load (   $id)
static

{Loads an entity.

Parameters
mixed$idThe id of the entity to load.
Returns
static The entity object or NULL if there is no entity with the given ID.
}

Implements EntityInterface.

References Drupal\entityManager().

Referenced by MenuTest\addCustomMenu(), CKEditorTest\assertCKEditorLanguage(), MigrateFieldInstanceWidgetSettingsTest\assertComponent(), MigrateFieldFormatterSettingsTest\assertComponent(), MigrateFieldFormatterSettingsTest\assertComponentNotExists(), MigrateCommentEntityFormDisplaySubjectTest\assertDisplay(), MigrateCommentEntityDisplayTest\assertDisplay(), MigrateCommentEntityFormDisplayTest\assertDisplay(), MigrateBlockTest\assertEntity(), MigrateFieldFormatterSettingsTest\assertEntity(), EntityReferenceFieldTranslatedReferenceViewTest\assertEntityReferenceDisplay(), FileFieldTestBase\assertFileEntryExists(), FileFieldTestBase\assertFileEntryNotExists(), AssignOwnerNode\buildConfigurationForm(), FieldStorageConfigEditForm\buildForm(), Comment\bundleFieldDefinitions(), DynamicPageCacheTestController\cacheableResponse(), BlockContentTestBase\createBlockContentType(), AggregatorTestBase\createFeed(), ContactSitewideTest\deleteContactForms(), MenuTest\deleteCustomMenu(), StandardProfileTest\doFrontPageRdfaTests(), StandardProfileTest\doPageRdfaTests(), ContentTranslationUITestBase\doTestAuthoringInfo(), ContentTranslationUITestBase\doTestBasicTranslation(), AreaEntityTest\doTestCalculateDependencies(), FrontPageTest\doTestFrontPageViewCacheTags(), MenuTest\doTestMenuBlock(), ContentTranslationUITestBase\doTestOutdatedStatus(), CommentTranslationUITest\doTestPublishedStatus(), ContentTranslationUITestBase\doTestPublishedStatus(), ContentTranslationUITestBase\doTestTranslationDeletion(), WebTestBase\drupalCreateContentType(), ForumTest\editForumVocabulary(), ContentTranslationHandler\entityFormAlter(), ContentTranslationHandler\entityFormEntityBuild(), BlockContentTranslationHandler\entityFormTitle(), ContentTranslationHandler\entityFormValidate(), MigrateTestBase\executeMigration(), TimestampDatetimeWidget\formElement(), Item\getCacheTagsToInvalidate(), FieldStorageConfigEditForm\getEntityFromRouteMatch(), Datetime\getHtml5DateFormat(), Datetime\getHtml5TimeFormat(), ConfigurableLanguageManager\getNativeLanguages(), TermSelection\getReferenceableEntities(), ViewUI\load(), MigrateDrupal6TestBase\migrateUsers(), CommentTestBase\postComment(), CommentNonNodeTest\postComment(), Element\preRenderTextFormat(), ImageWidget\process(), PathProcessorTest\processOutbound(), UpdateApiEntityDefinitionUpdateTest\reloadEntity(), NodeViewBuilder\renderLinks(), UserPictureTest\saveUserPicture(), MigrateNodeTest\setUp(), MigrateUploadTest\setUp(), EntityViewBuilderTest\setUp(), UserCacheTagsTest\setUp(), FeedCacheTagsTest\setUp(), ShortcutCacheTagsTest\setUp(), TourCacheTagsTest\setUp(), ItemCacheTagsTest\setUp(), FilterDateTest\setUp(), FeedLanguageTest\setUp(), ResourceTest\setUp(), CommentUserNameTest\setUp(), TextFormatElementFormTest\setUp(), CommentCacheTagsTest\setUp(), NodeRevisionsTest\setUp(), UserPasswordResetTest\setUp(), BulkFormAccessTest\setUp(), EntityCacheTagsTestBase\setUp(), UserRoleConditionTest\setUp(), FieldEntityLinkTest\setUpFixtures(), FormController\submitForm(), EntityReferenceFormatterTest\testAccess(), CommentFieldAccessTest\testAccessToAdministrativeFields(), UserPermissionsTest\testAdministratorRole(), FilterHtmlUpdateTest\testAllowedHtmlUpdate(), ArgumentPlaceholderUpdatePathTest\testArgumentPlaceholderUpdate(), EntityReferenceAutoCreateTest\testAutoCreate(), CommentInterfaceTest\testAutoFilledHtmlSubject(), BlockViewBuilderTest\testBasicRendering(), BlockTest\testBlock(), BlockContentTypeTest\testBlockContentTypeCreation(), BlockContentCreationTest\testBlockDelete(), EntityCrudHookTest\testBlockHooks(), BlockInvalidRegionTest\testBlockInInvalidRegion(), MigrateBlockTest\testBlockMigration(), BlockTest\testBlockUserRoleDelete(), BookUninstallTest\testBookUninstall(), RenderCacheIntegrationTest\testBuildRenderableWithCacheContexts(), CommentFieldsTest\testCommentDefaultFields(), MigrateCommentVariableEntityDisplayTest\testCommentEntityDisplay(), MigrateCommentVariableEntityFormDisplayTest\testCommentEntityFormDisplay(), MigrateCommentVariableEntityFormDisplaySubjectTest\testCommentEntityFormDisplay(), MigrateCommentVariableFieldTest\testCommentField(), EntityCrudHookTest\testCommentHooks(), CommentInterfaceTest\testCommentInterface(), CommentLanguageTest\testCommentLanguage(), CommentPagerTest\testCommentNewPageIndicator(), CommentStatisticsTest\testCommentNodeCommentStatistics(), CommentTokenReplaceTest\testCommentTokenReplacement(), MigrateCommentTypeTest\testCommentType(), CommentTypeTest\testCommentTypeCreation(), CommentTypeTest\testCommentTypeDeletion(), CommentActionsTest\testCommentUnpublishByKeyword(), BlockContentCreationTest\testConfigDependencies(), EntityReferenceItemTest\testConfigEntityReferenceItem(), ImageAdminStylesTest\testConfigImport(), ContactLinkTest\testContactLink(), EntityReferenceItemTest\testContentEntityReferenceItem(), FieldStorageCrudTest\testCreate(), UserPictureTest\testCreateDeletePicture(), MigrateDateFormatTest\testDateFormats(), DrupalDateTimeTest\testDateTimezone(), ImageFieldDefaultImagesTest\testDefaultImages(), FieldStorageCrudTest\testDelete(), ContentEntityNullStorageTest\testDeleteThroughImport(), HandlerFilterRolesTest\testDependencies(), LanguageDependencyInjectionTest\testDependencyInjectedNewDefaultLanguage(), BlockContentSaveTest\testDeterminingChanges(), NodeSaveTest\testDeterminingChanges(), FilterCrudTest\testDisableFallbackFormat(), EditorAdminTest\testDisableFormatWithEditor(), LanguageUILanguageNegotiationTest\testDisableLanguageSwitcher(), QuickEditLoadingTest\testDisplayOptions(), NodeRevisionsUiBypassAccessTest\testDisplayRevisionTab(), DisplayTest\testDisplayTitleInButtonsXss(), MigrateFieldFormatterSettingsTest\testEntityDisplaySettings(), MigrateUserPictureEntityFormDisplayTest\testEntityFormDisplaySettings(), EntityReferenceXSSTest\testEntityReferenceXSS(), EntityWithUriCacheTagsTestBase\testEntityUri(), SaveDataTest\testExistingError(), CopyTest\testExistingError(), MoveTest\testExistingError(), CopyTest\testExistingRename(), MoveTest\testExistingRename(), SaveDataTest\testExistingRename(), MoveTest\testExistingReplace(), CopyTest\testExistingReplace(), SaveDataTest\testExistingReplace(), MoveTest\testExistingReplaceSelf(), ExposedFormUITest\testExposedAdminUi(), FieldFieldTest\testFieldAliasRender(), FieldUpdateTest\testFieldUpdate8002(), FileFieldRSSContentTest\testFileFieldRSSContent(), EntityCrudHookTest\testFileHooks(), FileItemTest\testFileItem(), FileListingTest\testFileListingPages(), MigrateFileTest\testFiles(), FileTokenReplaceTest\testFileTokenReplacement(), MigrateFilterFormatTest\testFilterFormat(), TaxonomyIndexTidUiTest\testFilterUI(), ImageStyleFlushTest\testFlush(), TextFormatterTest\testFormatters(), ManageDisplayTest\testFormatterUI(), ForumTest\testForum(), ForumUninstallTest\testForumUninstallWithField(), EntityQueryTest\testForwardRevisions(), ManageFieldsTest\testHiddenFields(), ImageImportTest\testImport(), BlockContentSaveTest\testImport(), FieldImportChangeTest\testImportChange(), NodeImportChangeTest\testImportChange(), NodeImportCreateTest\testImportCreate(), FieldImportCreateTest\testImportCreate(), FieldImportCreateTest\testImportCreateDefault(), NodeImportCreateTest\testImportCreateDefault(), FieldImportDeleteTest\testImportDelete(), FieldStorageCrudTest\testIndexes(), ConfigInstallProfileOverrideTest\testInstallProfileConfigOverwrite(), DeleteTest\testInUse(), CKEditorTest\testJSTranslation(), BlockLanguageTest\testLanguageBlockVisibilityLanguageDelete(), LanguageConfigurationTest\testLanguageConfiguration(), LoadTest\testLoadMissingFid(), MigrateMenuTest\testMenu(), MenuLinkContentDeleteFormTest\testMenuLinkContentDeleteForm(), MigrateMenuLinkTest\testMenuLinks(), MenuUninstallTest\testMenuUninstall(), MigrateFieldInstanceTest\testMigrateFieldIntoUnknownNodeType(), MigrateNodeSettingPromoteTest\testMigration(), MigrateNodeSettingStickyTest\testMigration(), MigrateNodeTaxonomyTest\testMigration(), MigrateImageCacheTest\testMissingTable(), TermKernelTest\testMultipleParentDelete(), MigrateNodeTest\testNode(), NodeAccessLanguageTest\testNodeAccessQueryTag(), NodeAccessRecordsTest\testNodeAccessRecords(), BulkFormAccessTest\testNodeDeleteAccess(), CommentNodeChangesTest\testNodeDeletion(), FileFieldDisplayTest\testNodeDisplay(), BulkFormAccessTest\testNodeEditAccess(), NodeRevisionsUiTest\testNodeFormSaveWithoutRevision(), EntityCrudHookTest\testNodeHooks(), NodeRevisionsUiTest\testNodeRevisionDoubleEscapeFix(), ImageFieldAttributesTest\testNodeTeaser(), MigrateNodeTypeTest\testNodeType(), NodeTypeTest\testNodeTypeCreation(), NodeTypeTest\testNodeTypeDeletion(), NodeTypeTest\testNodeTypeGetFunctions(), MoveTest\testNormal(), CopyTest\testNormal(), SaveUploadTest\testNormal(), PageEditTest\testPageEdit(), PagePreviewTest\testPagePreview(), PagePreviewTest\testPagePreviewWithRevisions(), PageViewTest\testPageView(), NodeContextualLinksTest\testPageWithDisabledContextualModule(), UserLoginTest\testPasswordRehashOnLogin(), UserPictureTest\testPictureOnNodeComment(), FeedProcessorPluginTest\testPostProcess(), FilePrivateTest\testPrivateFile(), PrivateFileOnTranslatedEntityTest\testPrivateLanguageFile(), FeedProcessorPluginTest\testProcess(), NodeTranslationUITest\testPublishedStatusNoFields(), QueryTest\testQueryUI(), NodeBlockFunctionalTest\testRecentNodeBlock(), EntityCacheTagsTestBase\testReferencedEntity(), TourCacheTagsTest\testRenderedTour(), FileFieldValidateTest\testRequired(), UserPasswordResetTest\testResetImpersonation(), ResponsiveImageFieldDisplayTest\testResponsiveImageFieldFormattersEmptyMediaQuery(), FileFieldRevisionTest\testRevisions(), BlockContentRevisionsTest\testRevisions(), UserRoleAdminTest\testRoleAdministration(), UserRoleDeleteTest\testRoleDeleteUserRoleReferenceDelete(), RowUITest\testRowUI(), EntityReferenceItemTest\testSelectionHandlerSettings(), ShortcutLinksTest\testShortcutLinkAdd(), ShortcutLinksTest\testShortcutLinkChangePath(), ShortcutLinksTest\testShortcutLinkDelete(), ShortcutLinksTest\testShortcutLinkRename(), ShortcutSetsTest\testShortcutSetRename(), FileFieldWidgetTest\testSingleValuedWidget(), LoadTest\testSingleValues(), ConfigLanguageOverrideWebTest\testSiteNameTranslation(), MigrateTermNodeTest\testSkipNonExistentNode(), ImageAdminStylesTest\testStyle(), ImageAdminStylesTest\testStyleReplacement(), VocabularyUiTest\testTaxonomyAdminDeletingVocabulary(), TermTest\testTaxonomyTermChildTerms(), TermTest\testTaxonomyTermHierarchy(), EntityCrudHookTest\testTaxonomyTermHooks(), LoadMultipleTest\testTaxonomyTermMultipleLoad(), MigrateTaxonomyVocabularyTest\testTaxonomyVocabulary(), EntityCrudHookTest\testTaxonomyVocabularyHooks(), VocabularyCrudTest\testTaxonomyVocabularyLoadStaticReset(), PathTaxonomyTermTest\testTermAlias(), EditorFilterIntegrationTest\testTextFormatIntegration(), QuickEditLoadingTest\testTitleBaseField(), TrackerTest\testTrackerHistoryMetadata(), DeleteTest\testUnused(), UpdatePathTestBaseFilledTest\testUpdatedSite(), UpdatePathRC1TestBaseFilledTest\testUpdatedSite(), UpdateFeedItemTest\testUpdateFeedItem(), BlockContextMappingUpdateTest\testUpdateHookN(), MigrateUploadFieldTest\testUpload(), MigrateUploadEntityDisplayTest\testUploadEntityDisplay(), MigrateUploadEntityFormDisplayTest\testUploadEntityFormDisplay(), MigrateUploadInstanceTest\testUploadFieldInstance(), MigrateUrlAliasTest\testUrlAlias(), UserCancelTest\testUserCancelByAdmin(), UserCancelTest\testUserCancelChangePermission(), UserCancelTest\testUserDelete(), BulkFormAccessTest\testUserDeleteAccess(), UserDeleteTest\testUserDeleteMultiple(), BulkFormAccessTest\testUserEditAccess(), EntityReferenceSelectionAccessTest\testUserHandler(), EntityCrudHookTest\testUserHooks(), UserSaveTest\testUserImport(), UserAdminListingTest\testUserListing(), CacheContextOptimizationTest\testUserPermissionCacheContextOptimization(), MigrateUserPictureEntityDisplayTest\testUserPictureEntityDisplay(), MigrateUserProfileEntityFormDisplayTest\testUserProfileEntityFormDisplay(), MigrateUserProfileFieldTest\testUserProfileFields(), MigrateUserProfileEntityDisplayTest\testUserProfileFields(), MigrateUserProfileFieldInstanceTest\testUserProfileFields(), MigrateUserProfileValuesTest\testUserProfileValues(), UserTokenReplaceTest\testUserTokenReplacement(), UserCancelTest\testUserWithoutEmailCancelByAdmin(), QuickEditLoadingTest\testUserWithPermission(), RenderCacheIntegrationTest\testViewAddCacheMetadata(), MigrateViewModesTest\testViewModes(), TaxonomyFieldAllTermsTest\testViewsHandlerAllTermsWithTokens(), FieldHandlersUpdateTest\testViewsUpdate8004(), MigrateVocabularyEntityDisplayTest\testVocabularyEntityDisplay(), MigrateVocabularyEntityFormDisplayTest\testVocabularyEntityFormDisplay(), MigrateVocabularyFieldTest\testVocabularyField(), MigrateVocabularyFieldInstanceTest\testVocabularyFieldInstance(), MigrateFieldWidgetSettingsTest\testWidgetSettings(), SaveDataTest\testWithFilename(), SaveDataTest\testWithoutFilename(), ConfigurableLanguageManager\updateLockedLanguageWeights(), ManagedFile\validateManagedFile(), FileWidget\validateMultipleCount(), and ManagedFile\valueCallback().

Here is the call graph for this function:

static loadMultiple ( array  $ids = NULL)
static

{Loads one or more entities.

Parameters
array$idsAn array of entity IDs, or NULL to load all entities.
Returns
static[] An array of entity objects indexed by their IDs.
}

Implements EntityInterface.

References Drupal\entityManager().

Referenced by TaxonomyIndexTid\adminSummary(), DatabaseTestForm\buildForm(), ResponsiveImageStyle\calculateDependencies(), ContactSitewideTest\deleteContactForms(), FieldEntityLinkTest\doTestEntityLink(), NodeTranslationUITest\doUninstallTest(), MigrateTestBase\executeMigrations(), ViewUI\loadMultiple(), NodePermissions\nodeTypePermissions(), MigrateTestBase\prepareMigrations(), Element\preRenderTextFormat(), ManagedFile\processManagedFile(), CommentItem\storageSettingsForm(), MigrateBlockTest\testBlockMigration(), MigrateBookTest\testBook(), CreateTest\testCreateEntityTest(), CreateTest\testCreateResourceRestApiNotEnabled(), CreateTest\testCreateWithoutPermission(), MigrateDependenciesTest\testMigrateDependenciesOrder(), LoadTest\testMultiple(), NodeLoadMultipleTest\testNodeMultipleLoad(), NodeTypeTest\testNodeTypeGetFunctions(), FileMoveTest\testNormal(), SaveUploadTest\testNormal(), ShortcutSetsTest\testShortcutSetCreateWithSetName(), ShortcutSetsTest\testShortcutSetDelete(), VocabularyUiTest\testTaxonomyAdminChangingWeights(), VocabularyUiTest\testTaxonomyAdminNoVocabularies(), LoadMultipleTest\testTaxonomyTermMultipleLoad(), VocabularyCrudTest\testTaxonomyVocabularyDeleteWithTerms(), VocabularyCrudTest\testTaxonomyVocabularyLoadMultiple(), VocabularyCrudTest\testTaxonomyVocabularyLoadStaticReset(), MigrateTermNodeTest\testTermNode(), and MigrateUploadTest\testUpload().

Here is the call graph for this function:

Here is the caller graph for this function:

postCreate ( EntityStorageInterface  $storage)

{Acts on an entity after it is created but before hooks are invoked.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
}

Implements EntityInterface.

static postDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{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$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

References EntityStorageInterface\getEntityType().

Here is the call graph for this function:

static postLoad ( EntityStorageInterface  $storage,
array &  $entities 
)
static

{Acts on loaded entities.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

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$storageThe entity storage object.
bool$updateTRUE if the entity has been updated, or FALSE if it has been inserted.
}

Implements EntityInterface.

static preCreate ( EntityStorageInterface  $storage,
array &  $values 
)
static

{Changes the values of an entity before it is created.Load defaults for example.

Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
mixed[]$values An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified.
}

Implements EntityInterface.

static preDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{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$storageThe entity storage object.
\Drupal\Core\Entity\EntityInterface[]$entities An array of entities.
}

Implements EntityInterface.

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 automatically.

Todo:
Adjust existing implementations and the documentation according to https://www.drupal.org/node/2577609 to have a consistent API.
Parameters
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage object.
See Also
::preSave()
}

Implements EntityInterface.

referencedEntities ( )

{Gets a list of entities referenced by this entity.

Returns
[] An array of entities.
}

Implements EntityInterface.

save ( )

{Saves an entity permanently.When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported.

Returns
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
Exceptions
\Drupal\Core\Entity\EntityStorageExceptionIn case of failures an exception is thrown.
}

Implements EntityInterface.

References Entity\entityManager().

Referenced by Feed\deleteItems(), and Feed\refreshItems().

Here is the call graph for this function:

Here is the caller graph for this function:

setOriginalId (   $id)

{Sets the original ID.

Parameters
int | string | null$idThe new ID to set as original ID. If the entity supports renames, setting NULL will prevent an update from being considered a rename.
Returns
$this
}

Implements EntityInterface.

toArray ( )

{Gets an array of all property values.

Returns
mixed[] An array of property values, keyed by property name.
}

Implements EntityInterface.

toLink (   $text = NULL,
  $rel = 'canonical',
array  $options = [] 
)

{Generates the HTML for a link to this entity.

Parameters
string | null$text(optional) The link text for the anchor tag as a translated string. If NULL, it will use the entity's label. Defaults to NULL.
string$rel(optional) The link relationship type. Defaults to 'canonical'.
array$optionsSee ::generateFromRoute() for the available options.
Returns
A Link to the entity.
Exceptions
\Drupal\Core\Entity\EntityMalformedException
\Drupal\Core\Entity\Exception\UndefinedLinkTemplateException
}

Implements EntityInterface.

References Entity\label(), and Entity\toUrl().

Referenced by Entity\link().

Here is the call graph for this function:

Here is the caller graph for this function:

toUrl (   $rel = 'canonical',
array  $options = [] 
)

{Gets the URL object for the entity.The entity must have an id already. Content entities usually get their IDs by saving them.URI templates might be set in the links array in an annotation, for example:

links = {
"canonical" = "/node/{node}",
"edit-form" = "/node/{node}/edit",
"version-history" = "/node/{node}/revisions"
}

or specified in a callback function set like:

uri_callback = "comment_uri",

If the path is not set in the links array, the uri_callback function is used for setting the path. If this does not exist and the link relationship type is canonical, the path is set using the default template: entity/entityType/id.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
The URL object.
Exceptions
\Drupal\Core\Entity\EntityMalformedException
\Drupal\Core\Entity\Exception\UndefinedLinkTemplateException
}

Implements EntityInterface.

References Entity\bundle(), Entity\entityManager(), Entity\getEntityType(), Entity\getEntityTypeId(), Entity\language(), Entity\linkTemplates(), and Entity\urlRouteParameters().

Referenced by Entity\toLink(), Entity\url(), and Entity\urlInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

uriRelationships ( )

{Gets a list of URI relationships supported by this entity.

Returns
string[] An array of link relationships supported by this entity.
}

Implements EntityInterface.

References Entity\linkTemplates().

Here is the call graph for this function:

url (   $rel = 'canonical',
  $options = array() 
)

{Gets the public URL for this entity.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
string The URL for this entity.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Please use toUrl() instead.
See Also
::toUrl
}

Implements EntityInterface.

References Entity\hasLinkTemplate(), and Entity\toUrl().

Here is the call graph for this function:

urlInfo (   $rel = 'canonical',
array  $options = [] 
)

{Gets the URL object for the entity.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
array$optionsSee ::generateFromRoute() for the available options.
Returns
The URL object.
Deprecated:
in Drupal 8.0.0, intended to be removed in Drupal 9.0.0 Use ::toUrl() instead.
See Also
::toUrl
}

Implements EntityInterface.

References Entity\toUrl().

Here is the call graph for this function:

urlRouteParameters (   $rel)
protected

Gets an array of placeholders for this entity.

Individual entity classes may override this method to add additional placeholders if desired. If so, they should be sure to replicate the property caching logic.

Parameters
string$relThe link relationship type, for example: canonical or edit-form.
Returns
array An array of URI placeholders.

References Entity\getEntityTypeId(), and Entity\id().

Referenced by Entity\toUrl().

Here is the call graph for this function:

Here is the caller graph for this function:

uuid ( )

{Gets the entity UUID (Universally Unique Identifier).The UUID is guaranteed to be unique and can be used to identify an entity across multiple systems.

Returns
string|null The UUID of the entity, or NULL if the entity does not have one.
}

Implements EntityInterface.

Referenced by FieldStorageConfig\getUniqueStorageIdentifier(), and ConfigEntityBase\preSave().

Here is the caller graph for this function:

uuidGenerator ( )
protected

Gets the UUID generator.

Returns

Referenced by ImageStyle\addImageEffect().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: