Drupal 8  8.0.2
EntityDisplayModeBase Class Reference
Inheritance diagram for EntityDisplayModeBase:

Public Member Functions

 getTargetType ()
 
 setTargetType ($target_entity_type)
 
 calculateDependencies ()
 
 preSave (EntityStorageInterface $storage)
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __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 preDelete (EntityStorageInterface $storage, array $entities)
 
- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
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 Attributes

 $id
 
 $label
 
 $targetEntityType
 
 $status = TRUE
 
 $cache = TRUE
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Base class for config entity types with settings for form and view modes.

Member Function Documentation

calculateDependencies ( )

{Calculates dependencies and stores them in the dependency property.

Returns
$this
See Also
}

Implements ConfigEntityInterface.

References ConfigEntityBase\addDependency(), and Drupal\entityManager().

Here is the call graph for this function:

getTargetType ( )

{Gets the entity type this display mode is used for.

Returns
string The entity type name.
}

Implements EntityDisplayModeInterface.

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.

References Drupal\entityManager().

Here is the call graph for this function:

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.

References Drupal\entityManager().

Here is the call graph for this function:

setTargetType (   $target_entity_type)

{Set the entity type this display mode is used for.

Parameters
string$target_entity_typeThe target entity type for this display mode.
Returns
$this
}

Implements EntityDisplayModeInterface.


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