abstract class EntityDisplayBase in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityDisplayBase.php \Drupal\Core\Entity\EntityDisplayBase
 
Provides a common base class for entity view and form displays.
Hierarchy
- class \Drupal\Core\Entity\Entity implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses PluginDependencyTrait
- class \Drupal\Core\Entity\EntityDisplayBase implements EntityDisplayInterface
 
 
 - class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses PluginDependencyTrait
 
Expanded class hierarchy of EntityDisplayBase
2 files declare their use of EntityDisplayBase
- EntityFormDisplay.php in core/
lib/ Drupal/ Core/ Entity/ Entity/ EntityFormDisplay.php  - Contains \Drupal\Core\Entity\Entity\EntityFormDisplay.
 - EntityViewDisplay.php in core/
lib/ Drupal/ Core/ Entity/ Entity/ EntityViewDisplay.php  - Contains \Drupal\Core\Entity\Entity\EntityViewDisplay.
 
File
- core/
lib/ Drupal/ Core/ Entity/ EntityDisplayBase.php, line 18  - Contains \Drupal\Core\Entity\EntityDisplayBase.
 
Namespace
Drupal\Core\EntityView source
abstract class EntityDisplayBase extends ConfigEntityBase implements EntityDisplayInterface {
  /**
   * The 'mode' for runtime EntityDisplay objects used to render entities with
   * arbitrary display options rather than a configured view mode or form mode.
   *
   * @todo Prevent creation of a mode with this ID
   *   https://www.drupal.org/node/2410727
   */
  const CUSTOM_MODE = '_custom';
  /**
   * Unique ID for the config entity.
   *
   * @var string
   */
  protected $id;
  /**
   * Entity type to be displayed.
   *
   * @var string
   */
  protected $targetEntityType;
  /**
   * Bundle to be displayed.
   *
   * @var string
   */
  protected $bundle;
  /**
   * A list of field definitions eligible for configuration in this display.
   *
   * @var \Drupal\Core\Field\FieldDefinitionInterface[]
   */
  protected $fieldDefinitions;
  /**
   * View or form mode to be displayed.
   *
   * @var string
   */
  protected $mode = self::CUSTOM_MODE;
  /**
   * Whether this display is enabled or not. If the entity (form) display
   * is disabled, we'll fall back to the 'default' display.
   *
   * @var bool
   */
  protected $status;
  /**
   * List of component display options, keyed by component name.
   *
   * @var array
   */
  protected $content = array();
  /**
   * List of components that are set to be hidden.
   *
   * @var array
   */
  protected $hidden = array();
  /**
   * The original view or form mode that was requested (case of view/form modes
   * being configured to fall back to the 'default' display).
   *
   * @var string
   */
  protected $originalMode;
  /**
   * The plugin objects used for this display, keyed by field name.
   *
   * @var array
   */
  protected $plugins = array();
  /**
   * Context in which this entity will be used (e.g. 'display', 'form').
   *
   * @var string
   */
  protected $displayContext;
  /**
   * The plugin manager used by this entity type.
   *
   * @var \Drupal\Component\Plugin\PluginManagerBase
   */
  protected $pluginManager;
  /**
   * The renderer.
   *
   * @var \Drupal\Core\Render\RendererInterface
   */
  protected $renderer;
  /**
   * {@inheritdoc}
   */
  public function __construct(array $values, $entity_type) {
    if (!isset($values['targetEntityType']) || !isset($values['bundle'])) {
      throw new \InvalidArgumentException('Missing required properties for an EntityDisplay entity.');
    }
    if (!$this
      ->entityManager()
      ->getDefinition($values['targetEntityType'])
      ->isSubclassOf('\\Drupal\\Core\\Entity\\FieldableEntityInterface')) {
      throw new \InvalidArgumentException('EntityDisplay entities can only handle fieldable entity types.');
    }
    $this->renderer = \Drupal::service('renderer');
    // A plugin manager and a context type needs to be set by extending classes.
    if (!isset($this->pluginManager)) {
      throw new \RuntimeException('Missing plugin manager.');
    }
    if (!isset($this->displayContext)) {
      throw new \RuntimeException('Missing display context type.');
    }
    parent::__construct($values, $entity_type);
    $this->originalMode = $this->mode;
    $this
      ->init();
  }
  /**
   * Initializes the display.
   *
   * This fills in default options for components:
   * - that are not explicitly known as either "visible" or "hidden" in the
   *   display,
   * - or that are not supposed to be configurable.
   */
  protected function init() {
    // Only populate defaults for "official" view modes and form modes.
    if ($this->mode !== static::CUSTOM_MODE) {
      // Fill in defaults for extra fields.
      $context = $this->displayContext == 'view' ? 'display' : $this->displayContext;
      $extra_fields = \Drupal::entityManager()
        ->getExtraFields($this->targetEntityType, $this->bundle);
      $extra_fields = isset($extra_fields[$context]) ? $extra_fields[$context] : array();
      foreach ($extra_fields as $name => $definition) {
        if (!isset($this->content[$name]) && !isset($this->hidden[$name])) {
          // Extra fields are visible by default unless they explicitly say so.
          if (!isset($definition['visible']) || $definition['visible'] == TRUE) {
            $this->content[$name] = array(
              'weight' => $definition['weight'],
            );
          }
          else {
            $this->hidden[$name] = TRUE;
          }
        }
      }
      // Fill in defaults for fields.
      $fields = $this
        ->getFieldDefinitions();
      foreach ($fields as $name => $definition) {
        if (!$definition
          ->isDisplayConfigurable($this->displayContext) || !isset($this->content[$name]) && !isset($this->hidden[$name])) {
          $options = $definition
            ->getDisplayOptions($this->displayContext);
          if (!empty($options['type']) && $options['type'] == 'hidden') {
            $this->hidden[$name] = TRUE;
          }
          elseif ($options) {
            $this->content[$name] = $this->pluginManager
              ->prepareConfiguration($definition
              ->getType(), $options);
          }
          // Note: (base) fields that do not specify display options are not
          // tracked in the display at all, in order to avoid cluttering the
          // configuration that gets saved back.
        }
      }
    }
  }
  /**
   * {@inheritdoc}
   */
  public function getTargetEntityTypeId() {
    return $this->targetEntityType;
  }
  /**
   * {@inheritdoc}
   */
  public function getMode() {
    return $this
      ->get('mode');
  }
  /**
   * {@inheritdoc}
   */
  public function getOriginalMode() {
    return $this
      ->get('originalMode');
  }
  /**
   * {@inheritdoc}
   */
  public function getTargetBundle() {
    return $this->bundle;
  }
  /**
   * {@inheritdoc}
   */
  public function setTargetBundle($bundle) {
    $this
      ->set('bundle', $bundle);
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function id() {
    return $this->targetEntityType . '.' . $this->bundle . '.' . $this->mode;
  }
  /**
   * {@inheritdoc}
   */
  public function preSave(EntityStorageInterface $storage, $update = TRUE) {
    ksort($this->content);
    ksort($this->hidden);
    parent::preSave($storage, $update);
  }
  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    parent::calculateDependencies();
    $target_entity_type = $this
      ->entityManager()
      ->getDefinition($this->targetEntityType);
    // Create dependency on the bundle.
    $bundle_config_dependency = $target_entity_type
      ->getBundleConfigDependency($this->bundle);
    $this
      ->addDependency($bundle_config_dependency['type'], $bundle_config_dependency['name']);
    // If field.module is enabled, add dependencies on 'field_config' entities
    // for both displayed and hidden fields. We intentionally leave out base
    // field overrides, since the field still exists without them.
    if (\Drupal::moduleHandler()
      ->moduleExists('field')) {
      $components = $this->content + $this->hidden;
      $field_definitions = $this
        ->entityManager()
        ->getFieldDefinitions($this->targetEntityType, $this->bundle);
      foreach (array_intersect_key($field_definitions, $components) as $field_name => $field_definition) {
        if ($field_definition instanceof ConfigEntityInterface && $field_definition
          ->getEntityTypeId() == 'field_config') {
          $this
            ->addDependency('config', $field_definition
            ->getConfigDependencyName());
        }
      }
    }
    // Depend on configured modes.
    if ($this->mode != 'default') {
      $mode_entity = $this
        ->entityManager()
        ->getStorage('entity_' . $this->displayContext . '_mode')
        ->load($target_entity_type
        ->id() . '.' . $this->mode);
      $this
        ->addDependency('config', $mode_entity
        ->getConfigDependencyName());
    }
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function toArray() {
    $properties = parent::toArray();
    // Do not store options for fields whose display is not set to be
    // configurable.
    foreach ($this
      ->getFieldDefinitions() as $field_name => $definition) {
      if (!$definition
        ->isDisplayConfigurable($this->displayContext)) {
        unset($properties['content'][$field_name]);
        unset($properties['hidden'][$field_name]);
      }
    }
    return $properties;
  }
  /**
   * {@inheritdoc}
   */
  public function createCopy($mode) {
    $display = $this
      ->createDuplicate();
    $display->mode = $display->originalMode = $mode;
    return $display;
  }
  /**
   * {@inheritdoc}
   */
  public function getComponents() {
    return $this->content;
  }
  /**
   * {@inheritdoc}
   */
  public function getComponent($name) {
    return isset($this->content[$name]) ? $this->content[$name] : NULL;
  }
  /**
   * {@inheritdoc}
   */
  public function setComponent($name, array $options = array()) {
    // If no weight specified, make sure the field sinks at the bottom.
    if (!isset($options['weight'])) {
      $max = $this
        ->getHighestWeight();
      $options['weight'] = isset($max) ? $max + 1 : 0;
    }
    // For a field, fill in default options.
    if ($field_definition = $this
      ->getFieldDefinition($name)) {
      $options = $this->pluginManager
        ->prepareConfiguration($field_definition
        ->getType(), $options);
    }
    // Ensure we always have an empty settings and array.
    $options += [
      'settings' => [],
      'third_party_settings' => [],
    ];
    $this->content[$name] = $options;
    unset($this->hidden[$name]);
    unset($this->plugins[$name]);
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function removeComponent($name) {
    $this->hidden[$name] = TRUE;
    unset($this->content[$name]);
    unset($this->plugins[$name]);
    return $this;
  }
  /**
   * {@inheritdoc}
   */
  public function getHighestWeight() {
    $weights = array();
    // Collect weights for the components in the display.
    foreach ($this->content as $options) {
      if (isset($options['weight'])) {
        $weights[] = $options['weight'];
      }
    }
    // Let other modules feedback about their own additions.
    $weights = array_merge($weights, \Drupal::moduleHandler()
      ->invokeAll('field_info_max_weight', array(
      $this->targetEntityType,
      $this->bundle,
      $this->displayContext,
      $this->mode,
    )));
    return $weights ? max($weights) : NULL;
  }
  /**
   * Gets the field definition of a field.
   */
  protected function getFieldDefinition($field_name) {
    $definitions = $this
      ->getFieldDefinitions();
    return isset($definitions[$field_name]) ? $definitions[$field_name] : NULL;
  }
  /**
   * Gets the definitions of the fields that are candidate for display.
   */
  protected function getFieldDefinitions() {
    if (!isset($this->fieldDefinitions)) {
      $definitions = \Drupal::entityManager()
        ->getFieldDefinitions($this->targetEntityType, $this->bundle);
      // For "official" view modes and form modes, ignore fields whose
      // definition states they should not be displayed.
      if ($this->mode !== static::CUSTOM_MODE) {
        $definitions = array_filter($definitions, array(
          $this,
          'fieldHasDisplayOptions',
        ));
      }
      $this->fieldDefinitions = $definitions;
    }
    return $this->fieldDefinitions;
  }
  /**
   * Determines if a field has options for a given display.
   *
   * @param FieldDefinitionInterface $definition
   *   A field definition.
   * @return array|null
   */
  private function fieldHasDisplayOptions(FieldDefinitionInterface $definition) {
    // The display only cares about fields that specify display options.
    // Discard base fields that are not rendered through formatters / widgets.
    return $definition
      ->getDisplayOptions($this->displayContext);
  }
  /**
   * {@inheritdoc}
   */
  public function onDependencyRemoval(array $dependencies) {
    $changed = parent::onDependencyRemoval($dependencies);
    foreach ($dependencies['config'] as $entity) {
      if ($entity
        ->getEntityTypeId() == 'field_config') {
        // Remove components for fields that are being deleted.
        $this
          ->removeComponent($entity
          ->getName());
        unset($this->hidden[$entity
          ->getName()]);
        $changed = TRUE;
      }
    }
    foreach ($this
      ->getComponents() as $name => $component) {
      if ($renderer = $this
        ->getRenderer($name)) {
        if (in_array($renderer
          ->getPluginDefinition()['provider'], $dependencies['module'])) {
          // Revert to the defaults if the plugin that supplies the widget or
          // formatter depends on a module that is being uninstalled.
          $this
            ->setComponent($name);
          $changed = TRUE;
        }
        // Give this component the opportunity to react on dependency removal.
        $component_removed_dependencies = $this
          ->getPluginRemovedDependencies($renderer
          ->calculateDependencies(), $dependencies);
        if ($component_removed_dependencies) {
          if ($renderer
            ->onDependencyRemoval($component_removed_dependencies)) {
            // Update component settings to reflect changes.
            $component['settings'] = $renderer
              ->getSettings();
            $component['third_party_settings'] = [];
            foreach ($renderer
              ->getThirdPartyProviders() as $module) {
              $component['third_party_settings'][$module] = $renderer
                ->getThirdPartySettings($module);
            }
            $this
              ->setComponent($name, $component);
            $changed = TRUE;
          }
          // If there are unresolved deleted dependencies left, disable this
          // component to avoid the removal of the entire display entity.
          if ($this
            ->getPluginRemovedDependencies($renderer
            ->calculateDependencies(), $dependencies)) {
            $this
              ->removeComponent($name);
            $arguments = [
              '@display' => (string) $this
                ->getEntityType()
                ->getLabel(),
              '@id' => $this
                ->id(),
              '@name' => $name,
            ];
            $this
              ->getLogger()
              ->warning("@display '@id': Component '@name' was disabled because its settings depend on removed dependencies.", $arguments);
            $changed = TRUE;
          }
        }
      }
    }
    return $changed;
  }
  /**
   * Returns the plugin dependencies being removed.
   *
   * The function recursively computes the intersection between all plugin
   * dependencies and all removed dependencies.
   *
   * Note: The two arguments do not have the same structure.
   *
   * @param array[] $plugin_dependencies
   *   A list of dependencies having the same structure as the return value of
   *   ConfigEntityInterface::calculateDependencies().
   * @param array[] $removed_dependencies
   *   A list of dependencies having the same structure as the input argument of
   *   ConfigEntityInterface::onDependencyRemoval().
   *
   * @return array
   *   A recursively computed intersection.
   *
   * @see \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies()
   * @see \Drupal\Core\Config\Entity\ConfigEntityInterface::onDependencyRemoval()
   */
  protected function getPluginRemovedDependencies(array $plugin_dependencies, array $removed_dependencies) {
    $intersect = [];
    foreach ($plugin_dependencies as $type => $dependencies) {
      if ($removed_dependencies[$type]) {
        // Config and content entities have the dependency names as keys while
        // module and theme dependencies are indexed arrays of dependency names.
        // @see \Drupal\Core\Config\ConfigManager::callOnDependencyRemoval()
        if (in_array($type, [
          'config',
          'content',
        ])) {
          $removed = array_intersect_key($removed_dependencies[$type], array_flip($dependencies));
        }
        else {
          $removed = array_values(array_intersect($removed_dependencies[$type], $dependencies));
        }
        if ($removed) {
          $intersect[$type] = $removed;
        }
      }
    }
    return $intersect;
  }
  /**
   * {@inheritdoc}
   */
  public function __sleep() {
    // Only store the definition, not external objects or derived data.
    $keys = array_keys($this
      ->toArray());
    // In addition, we need to keep the entity type and the "is new" status.
    $keys[] = 'entityTypeId';
    $keys[] = 'enforceIsNew';
    // Keep track of the serialized keys, to avoid calling toArray() again in
    // __wakeup(). Because of the way __sleep() works, the data has to be
    // present in the object to be included in the serialized values.
    $keys[] = '_serializedKeys';
    $this->_serializedKeys = $keys;
    return $keys;
  }
  /**
   * {@inheritdoc}
   */
  public function __wakeup() {
    // Determine what were the properties from toArray() that were saved in
    // __sleep().
    $keys = $this->_serializedKeys;
    unset($this->_serializedKeys);
    $values = array_intersect_key(get_object_vars($this), array_flip($keys));
    // Run those values through the __construct(), as if they came from a
    // regular entity load.
    $this
      ->__construct($values, $this->entityTypeId);
  }
  /**
   * Provides the 'system' channel logger service.
   *
   * @return \Psr\Log\LoggerInterface
   *   The 'system' channel logger.
   */
  protected function getLogger() {
    return \Drupal::logger('system');
  }
}Members
| 
            Name | 
                  Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| 
            ConfigEntityBase:: | 
                  private | property | Whether the config is being created, updated or deleted through the import process. | |
| 
            ConfigEntityBase:: | 
                  private | property | Whether the config is being deleted by the uninstall process. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The language code of the entity's default language. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The original ID of the configuration entity. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The name of the property that is used to store plugin configuration. | |
| 
            ConfigEntityBase:: | 
                  protected | property | Third party entity settings. | |
| 
            ConfigEntityBase:: | 
                  protected | property | Trust supplied data and not use configuration schema on save. | |
| 
            ConfigEntityBase:: | 
                  protected | property | The UUID for this entity. | |
| 
            ConfigEntityBase:: | 
                  protected | function | Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Creates a duplicate of the entity. Overrides Entity:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Disables the configuration entity. Overrides ConfigEntityInterface:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Enables the configuration entity. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns the value of a property. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns the cache tags that should be used to invalidate caches. Overrides Entity:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration dependency name. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected static | function | Gets the configuration manager. | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration target identifier for the entity. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the configuration dependencies. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the original ID. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected | function | Gets the typed config manager. | |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets whether on not the data is trusted. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected static | function | 
            Override to never invalidate the individual entities' cache tags; the
config system already invalidates them. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  protected | function | 
            Override to never invalidate the entity's cache tag; the config system
already invalidates it. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Checks whether this entity is installable. Overrides ConfigEntityInterface:: | 
                  2 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Overrides Entity::isNew(). Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns whether this entity is being changed as part of an import process. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Deprecated way of generating a link to the entity. See toLink(). Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public static | function | 
            Acts on entities before they are deleted and before hooks are invoked. Overrides Entity:: | 
                  7 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Saves an entity permanently. Overrides Entity:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the value of a property. Overrides ConfigEntityInterface:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the original ID. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the status of the configuration entity. Overrides ConfigEntityInterface:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the status of the isSyncing flag. Overrides ConfigEntityInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | ||
| 
            ConfigEntityBase:: | 
                  public static | function | Helper callback for uasort() to sort configuration entities by weight and label. | 6 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface:: | 
                  2 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the URL object for the entity. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Sets that the data should be trusted. Overrides ConfigEntityInterface:: | 
                  1 | 
| 
            ConfigEntityBase:: | 
                  public | function | 
            Unsets a third-party setting. Overrides ThirdPartySettingsInterface:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the public URL for this entity. Overrides Entity:: | 
                  |
| 
            ConfigEntityBase:: | 
                  public | function | 
            Gets the URL object for the entity. Overrides Entity:: | 
                  |
| 
            DependencySerializationTrait:: | 
                  protected | property | An array of service IDs keyed by property name used for serialization. | |
| 
            DependencySerializationTrait:: | 
                  public | function | Aliased as: traitSleep | 1 | 
| 
            DependencyTrait:: | 
                  protected | property | The object's dependencies. | 1 | 
| 
            DependencyTrait:: | 
                  protected | function | Adds multiple dependencies. | |
| 
            DependencyTrait:: | 
                  protected | function | Adds a dependency. Aliased as: addDependencyTrait | |
| 
            Entity:: | 
                  protected | property | Boolean indicating whether the entity should be forced to be new. | |
| 
            Entity:: | 
                  protected | property | The entity type. | |
| 
            Entity:: | 
                  protected | property | A typed data object wrapping this entity. | |
| 
            Entity:: | 
                  public | function | 
            Checks data value access. Overrides AccessibleInterface:: | 
                  1 | 
| 
            Entity:: | 
                  public | function | 
            Gets the bundle of the entity. Overrides EntityInterface:: | 
                  1 | 
| 
            Entity:: | 
                  public static | function | 
            Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Deletes an entity permanently. Overrides EntityInterface:: | 
                  2 | 
| 
            Entity:: | 
                  public | function | 
            Enforces an entity to be new. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  protected | function | Gets the entity manager. | |
| 
            Entity:: | 
                  protected | function | Gets the entity type manager. | |
| 
            Entity:: | 
                  public | function | 
            The cache contexts associated with this object. Overrides RefinableCacheableDependencyTrait:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            The maximum age for which this object may be cached. Overrides RefinableCacheableDependencyTrait:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            The cache tags associated with this object. Overrides RefinableCacheableDependencyTrait:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Gets the entity type definition. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Gets the ID of the type of the entity. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Gets a typed data object for this entity object. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Indicates if a link template exists for a given key. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Gets the label of the entity. Overrides EntityInterface:: | 
                  5 | 
| 
            Entity:: | 
                  public | function | 
            Gets the language of the entity. Overrides EntityInterface:: | 
                  1 | 
| 
            Entity:: | 
                  protected | function | Gets the language manager. | |
| 
            Entity:: | 
                  protected | function | Gets an array link templates. | 1 | 
| 
            Entity:: | 
                  public static | function | 
            Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public static | function | 
            Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Acts on an entity after it is created but before hooks are invoked. Overrides EntityInterface:: | 
                  4 | 
| 
            Entity:: | 
                  public static | function | 
            Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface:: | 
                  14 | 
| 
            Entity:: | 
                  public static | function | 
            Acts on loaded entities. Overrides EntityInterface:: | 
                  2 | 
| 
            Entity:: | 
                  public | function | 
            Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface:: | 
                  20 | 
| 
            Entity:: | 
                  public static | function | 
            Changes the values of an entity before it is created. Overrides EntityInterface:: | 
                  6 | 
| 
            Entity:: | 
                  public | function | 
            Gets a list of entities referenced by this entity. Overrides EntityInterface:: | 
                  1 | 
| 
            Entity:: | 
                  public | function | 
            Generates the HTML for a link to this entity. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  public | function | 
            Returns a list of URI relationships supported by this entity. Overrides EntityInterface:: | 
                  |
| 
            Entity:: | 
                  protected | function | Gets an array of placeholders for this entity. | 1 | 
| 
            Entity:: | 
                  public | function | 
            Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: | 
                  1 | 
| 
            Entity:: | 
                  protected | function | Gets the UUID generator. | |
| 
            EntityDisplayBase:: | 
                  protected | property | Bundle to be displayed. | |
| 
            EntityDisplayBase:: | 
                  protected | property | List of component display options, keyed by component name. | |
| 
            EntityDisplayBase:: | 
                  protected | property | Context in which this entity will be used (e.g. 'display', 'form'). | 2 | 
| 
            EntityDisplayBase:: | 
                  protected | property | A list of field definitions eligible for configuration in this display. | |
| 
            EntityDisplayBase:: | 
                  protected | property | List of components that are set to be hidden. | |
| 
            EntityDisplayBase:: | 
                  protected | property | Unique ID for the config entity. | |
| 
            EntityDisplayBase:: | 
                  protected | property | View or form mode to be displayed. | |
| 
            EntityDisplayBase:: | 
                  protected | property | The original view or form mode that was requested (case of view/form modes being configured to fall back to the 'default' display). | |
| 
            EntityDisplayBase:: | 
                  protected | property | The plugin manager used by this entity type. | |
| 
            EntityDisplayBase:: | 
                  protected | property | The plugin objects used for this display, keyed by field name. | |
| 
            EntityDisplayBase:: | 
                  protected | property | The renderer. | |
| 
            EntityDisplayBase:: | 
                  protected | property | 
            Whether this display is enabled or not. If the entity (form) display
is disabled, we'll fall back to the 'default' display. Overrides ConfigEntityBase:: | 
                  |
| 
            EntityDisplayBase:: | 
                  protected | property | Entity type to be displayed. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityBase:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Creates a duplicate of the entity display object on a different view mode. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  constant | The 'mode' for runtime EntityDisplay objects used to render entities with arbitrary display options rather than a configured view mode or form mode. | ||
| 
            EntityDisplayBase:: | 
                  private | function | Determines if a field has options for a given display. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the display options set for a component. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the display options for all components. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  protected | function | Gets the field definition of a field. | |
| 
            EntityDisplayBase:: | 
                  protected | function | Gets the definitions of the fields that are candidate for display. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the highest weight of the components in the display. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  protected | function | Provides the 'system' channel logger service. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the view or form mode to be displayed. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the original view or form mode that was requested. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  protected | function | Returns the plugin dependencies being removed. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the bundle to be displayed. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the entity type for which this display is used. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets the identifier. Overrides Entity:: | 
                  |
| 
            EntityDisplayBase:: | 
                  protected | function | Initializes the display. | |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityBase:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Acts on an entity before the presave hook is invoked. Overrides ConfigEntityBase:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Sets a component to be hidden. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Sets the display options for a component. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Sets the bundle to be displayed. Overrides EntityDisplayInterface:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Gets an array of all property values. Overrides ConfigEntityBase:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Constructs an Entity object. Overrides ConfigEntityBase:: | 
                  2 | 
| 
            EntityDisplayBase:: | 
                  public | function | 
            Overrides Entity:: | 
                  |
| 
            EntityDisplayBase:: | 
                  public | function | 
            Overrides DependencySerializationTrait:: | 
                  |
| 
            EntityDisplayInterface:: | 
                  public | function | Gets the renderer plugin for a field (e.g. widget, formatter). | 2 | 
| 
            EntityWithPluginCollectionInterface:: | 
                  public | function | Gets the plugin collections used by this entity. | 7 | 
| 
            PluginDependencyTrait:: | 
                  protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 | 
| 
            RefinableCacheableDependencyTrait:: | 
                  protected | property | Cache contexts. | |
| 
            RefinableCacheableDependencyTrait:: | 
                  protected | property | Cache max-age. | |
| 
            RefinableCacheableDependencyTrait:: | 
                  protected | property | Cache tags. | |
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | 1 | |
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | ||
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function | ||
| 
            RefinableCacheableDependencyTrait:: | 
                  public | function |