You are here

interface EntityTypeInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface

Provides an interface for an entity type and its metadata.

Additional information can be provided by modules: hook_entity_type_build() can be implemented to define new properties, while hook_entity_type_alter() can be implemented to alter existing data and fill-in defaults. Module-specific properties should be documented in the hook implementations defining them.

Hierarchy

Expanded class hierarchy of EntityTypeInterface

All classes that implement EntityTypeInterface

120 files declare their use of EntityTypeInterface
ActionListBuilder.php in core/modules/action/src/ActionListBuilder.php
Contains \Drupal\action\ActionListBuilder.
AdminHtmlRouteProvider.php in core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php
Contains \Drupal\Core\Entity\Routing\AdminHtmlRouteProvider.
AreaEntityTest.php in core/modules/views/src/Tests/Handler/AreaEntityTest.php
Contains \Drupal\views\Tests\Handler\AreaEntityTest.
BaseFieldOverrideStorage.php in core/lib/Drupal/Core/Field/BaseFieldOverrideStorage.php
Contains \Drupal\Core\Field\BaseFieldOverrideStorage.
BlockAccessControlHandler.php in core/modules/block/src/BlockAccessControlHandler.php
Contains \Drupal\block\BlockAccessControlHandler.

... See full list

File

core/lib/Drupal/Core/Entity/EntityTypeInterface.php, line 20
Contains \Drupal\Core\Entity\EntityTypeInterface.

Namespace

Drupal\Core\Entity
View source
interface EntityTypeInterface extends PluginDefinitionInterface {

  /**
   * The maximum length of ID, in characters.
   */
  const ID_MAX_LENGTH = 32;

  /**
   * The maximum length of bundle name, in characters.
   */
  const BUNDLE_MAX_LENGTH = 32;

  /**
   * Gets any arbitrary property.
   *
   * @param string $property
   *   The property to retrieve.
   *
   * @return mixed
   *   The value for that property, or NULL if the property does not exist.
   */
  public function get($property);

  /**
   * Sets a value to an arbitrary property.
   *
   * @param string $property
   *   The property to use for the value.
   * @param mixed $value
   *   The value to set.
   *
   * @return $this
   */
  public function set($property, $value);

  /**
   * Gets the unique identifier of the entity type.
   *
   * @return string
   *   The unique identifier of the entity type.
   */
  public function id();

  /**
   * Gets the name of the provider of this entity type.
   *
   * @return string
   *   The name of the provider of this entity type.
   */
  public function getProvider();

  /**
   * Gets the name of the original entity type class.
   *
   * In case the class name was changed with setClass(), this will return
   * the initial value. Useful when trying to identify the entity type ID based
   * on the class.
   *
   * @return string
   *   The name of the original entity type class.
   */
  public function getOriginalClass();

  /**
   * Gets an array of entity keys.
   *
   * @return array
   *   An array describing how the Field API can extract certain information
   *   from objects of this entity type:
   *   - id: The name of the property that contains the primary ID of the
   *     entity. Every entity object passed to the Field API must have this
   *     property and its value must be numeric.
   *   - revision: (optional) The name of the property that contains the
   *     revision ID of the entity. The Field API assumes that all revision IDs
   *     are unique across all entities of a type. If this entry is omitted
   *     the entities of this type are not revisionable.
   *   - bundle: (optional) The name of the property that contains the bundle
   *     name for the entity. The bundle name defines which set of fields are
   *     attached to the entity (e.g. what nodes call "content type"). This
   *     entry can be omitted if this entity type exposes a single bundle (such
   *     that all entities have the same collection of fields). The name of this
   *     single bundle will be the same as the entity type.
   *   - label: (optional) The name of the property that contains the entity
   *     label. For example, if the entity's label is located in
   *     $entity->subject, then 'subject' should be specified here. If complex
   *     logic is required to build the label,
   *     \Drupal\Core\Entity\EntityInterface::label() should be used.
   *   - langcode: (optional) The name of the property that contains the
   *     language code. For instance, if the entity's language is located in
   *     $entity->langcode, then 'langcode' should be specified here.
   *   - uuid: (optional) The name of the property that contains the universally
   *     unique identifier of the entity, which is used to distinctly identify
   *     an entity across different systems.
   */
  public function getKeys();

  /**
   * Gets a specific entity key.
   *
   * @param string $key
   *   The name of the entity key to return.
   *
   * @return string|bool
   *   The entity key, or FALSE if it does not exist.
   *
   * @see self::getKeys()
   */
  public function getKey($key);

  /**
   * Indicates if a given entity key exists.
   *
   * @param string $key
   *   The name of the entity key to check.
   *
   * @return bool
   *   TRUE if a given entity key exists, FALSE otherwise.
   */
  public function hasKey($key);

  /**
   * Indicates whether entities should be statically cached.
   *
   * @return bool
   *   TRUE if static caching should be used; FALSE otherwise.
   */
  public function isStaticallyCacheable();

  /**
   * Indicates whether the rendered output of entities should be cached.
   *
   * @return bool
   */
  public function isRenderCacheable();

  /**
   * Indicates if the persistent cache of field data should be used.
   *
   * @todo Used by ContentEntityStorageBase only.
   *
   * The persistent cache should usually only be disabled if a higher level
   * persistent cache is available for the entity type.
   *
   * @return bool
   */
  public function isPersistentlyCacheable();

  /**
   * Determines if there is a handler for a given type.
   *
   * @param string $handler_type
   *   The type of handler to check.
   * @param bool $nested
   *   (optional) If this handler has a nested definition. Defaults to FALSE.
   *
   * @return bool
   *   TRUE if a handler of this type exists, FALSE otherwise.
   */
  public function hasHandlerClass($handler_type, $nested = FALSE);

  /**
   * @param string $handler_type
   *   The handler type to get.
   *
   * @return array|string|null
   *   The handlers for a given type, or NULL if none exist.
   */
  public function getHandlerClass($handler_type);

  /**
   * Gets an array of handlers.
   *
   * @return array
   *   An associative array where the keys are the names of different handler
   *   types (listed below) and the values are the names of the classes that
   *   implement that handler:
   *   - storage: The name of the class used to load the objects. The class must
   *     implement \Drupal\Core\Entity\EntityStorageInterface.
   *   - form: An associative array where the keys are the names of the
   *     different form operations (such as 'create', 'edit', or 'delete') and
   *     the values are the names of the handler classes for those
   *     operations. The name of the operation is passed also to the form
   *     handler's constructor, so that one class can be used for multiple
   *     entity forms when the forms are similar. The classes must implement
   *     \Drupal\Core\Entity\EntityFormInterface.
   *   - list: The name of the class that provides listings of the entities. The
   *     class must implement \Drupal\Core\Entity\EntityListBuilderInterface.
   *   - render: The name of the class that is used to render the entities. The
   *     class must implement \Drupal\Core\Entity\EntityViewBuilderInterface.
   *   - access: The name of the class that is used for access checks. The class
   *     must implement \Drupal\Core\Entity\EntityAccessControlHandlerInterface.
   *     Defaults to \Drupal\Core\Entity\EntityAccessControlHandler.
   *   - route_provider: (optional) A list of class names, keyed by a group
   *     string, which will be used to define routes related to this entity
   *     type. These classes must implement
   *     \Drupal\Core\Entity\Routing\EntityRouteProviderInterface.
   */
  public function getHandlerClasses();

  /**
   * Gets the storage class.
   *
   * @return string
   *   The class for this entity type's storage.
   */
  public function getStorageClass();

  /**
   * Sets the storage class.
   *
   * @param string $class
   *   The class for this entity type's storage.
   *
   * @return $this
   */
  public function setStorageClass($class);

  /**
   * Gets the form class for a specific operation.
   *
   * @param string $operation
   *   The name of the operation to use, e.g., 'default'.
   *
   * @return string
   *   The class for this operation's form for this entity type.
   *
   * @see \Drupal\Core\Entity\EntityFormBuilderInterface
   */
  public function getFormClass($operation);

  /**
   * Sets a form class for a specific operation.
   *
   * @param string $operation
   *   The operation to use this form class for.
   * @param string $class
   *   The form class implementing
   *   \Drupal\Core\Entity\EntityFormInterface.
   *
   * @return $this
   *
   * @see \Drupal\Core\Entity\EntityFormBuilderInterface
   */
  public function setFormClass($operation, $class);

  /**
   * Indicates if this entity type has any forms.
   *
   * @return bool
   *   TRUE if there are any forms for this entity type, FALSE otherwise.
   */
  public function hasFormClasses();

  /**
   * Indicates if this entity type has any route provider.
   *
   * @return bool
   */
  public function hasRouteProviders();

  /**
   * Gets all the route provide handlers.
   *
   * Much like forms you can define multiple route provider handlers.
   *
   * @return string[]
   */
  public function getRouteProviderClasses();

  /**
   * Gets the list class.
   *
   * @return string
   *   The class for this entity type's list.
   */
  public function getListBuilderClass();

  /**
   * Sets the list class.
   *
   * @param string $class
   *   The list class to use for the operation.
   *
   * @return $this
   */
  public function setListBuilderClass($class);

  /**
   * Indicates if this entity type has a list class.
   *
   * @return bool
   *   TRUE if there is a list for this entity type, FALSE otherwise.
   */
  public function hasListBuilderClass();

  /**
   * Gets the view builder class.
   *
   * @return string
   *   The class for this entity type's view builder.
   */
  public function getViewBuilderClass();

  /**
   * Gets the view builder class.
   *
   * @param string $class
   *   The class for this entity type's view builder.
   *
   * @return $this
   */
  public function setViewBuilderClass($class);

  /**
   * Indicates if this entity type has a view builder.
   *
   * @return bool
   *   TRUE if there is a view builder for this entity type, FALSE otherwise.
   */
  public function hasViewBuilderClass();

  /**
   * Gets the access control class.
   *
   * @return string
   *   The class for this entity type's access control.
   */
  public function getAccessControlClass();

  /**
   * Gets the access class.
   *
   * @param string $class
   *   The class for this entity type's access.
   *
   * @return $this
   */
  public function setAccessClass($class);

  /**
   * Indicates if the entity type is a subclass of the given class or interface.
   *
   * @param string $class
   *   The class or interface to check.
   *
   * @return bool
   *   TRUE if the entity type is a subclass of the class or interface.
   */
  public function isSubclassOf($class);

  /**
   * Sets the handlers for a given type.
   *
   * @param string $handler_type
   *   The type of handler to set.
   * @param array|string $value
   *   The value for a handler type.
   *
   * @return $this
   */
  public function setHandlerClass($handler_type, $value);

  /**
   * Gets the name of the default administrative permission.
   *
   * The default \Drupal\Core\Entity\EntityAccessControlHandler class checks this
   * permission for all operations in its checkAccess() method. Entities with
   * more complex permissions can extend this class to do their own access
   * checks.
   *
   * @return string|bool
   */
  public function getAdminPermission();

  /**
   * Gets the permission granularity level.
   *
   * The allowed values are respectively "entity_type" or "bundle".
   *
   * @return string
   *   Whether a module exposing permissions for the current entity type
   *   should use entity-type level granularity or bundle level granularity.
   */
  public function getPermissionGranularity();

  /**
   * Gets the link templates using the URI template syntax.
   *
   * Links are an array of standard link relations to the URI template that
   * should be used for them. Where possible, link relationships should use
   * established IANA relationships rather than custom relationships.
   *
   * Every entity type should, at minimum, define "canonical", which is the
   * pattern for URIs to that entity. Even if the entity will have no HTML page
   * exposed to users it should still have a canonical URI in order to be
   * compatible with web services. Entities that will be user-editable via an
   * HTML page must also define an "edit-form" relationship.
   *
   * By default, the following placeholders are supported:
   * - [entityType]: The entity type itself will also be a valid token for the
   *   ID of the entity. For instance, a placeholder of {node} used on the Node
   *   class.
   * - [bundleEntityType]: The bundle machine name itself. For instance, a
   *   placeholder of {node_type} used on the Node class.
   *
   * Specific entity types may also expand upon this list by overriding the
   * Entity::urlRouteParameters() method.
   *
   * @link http://www.iana.org/assignments/link-relations/link-relations.xml @endlink
   * @link http://tools.ietf.org/html/rfc6570 @endlink
   *
   * @return array
   */
  public function getLinkTemplates();

  /**
   * Gets the link template for a given key.
   *
   * @param string $key
   *   The link type.
   *
   * @return string|bool
   *   The path for this link, or FALSE if it doesn't exist.
   */
  public function getLinkTemplate($key);

  /**
   * Indicates if a link template exists for a given key.
   *
   * @param string $key
   *   The link type.
   *
   * @return bool
   *   TRUE if the link template exists, FALSE otherwise.
   */
  public function hasLinkTemplate($key);

  /**
   * Sets a single link template.
   *
   * @param string $key
   *   The name of a link.
   * @param string $path
   *   The route path to use for the link.
   *
   * @return $this
   *
   * @throws \InvalidArgumentException
   *   Thrown when the path does not start with a leading slash.
   */
  public function setLinkTemplate($key, $path);

  /**
   * Gets the callback for the label of the entity.
   *
   * The function takes an entity and returns the label of the entity. Use
   * language() on the entity to get information on the requested language. The
   * entity label is the main string associated with an entity; for example, the
   * title of a node or the subject of a comment. If there is an entity object
   * property that defines the label, use the 'label' element of the
   * 'entity_keys' return value component to provide this information. If more
   * complex logic is needed to determine the label of an entity, you can
   * instead specify a callback function here, which will be called to determine
   * the entity label.
   *
   * @return callable|null
   *   The callback, or NULL if none exists.
   *
   * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
   *   Use Drupal\Core\Entity\EntityInterface::label() for complex label
   *   generation as needed.
   *
   * @see \Drupal\Core\Entity\EntityInterface::label()
   * @see \Drupal\Core\Entity\EntityTypeInterface::setLabelCallback()
   * @see \Drupal\Core\Entity\EntityTypeInterface::hasLabelCallback()
   *
   * @todo Remove usages of label_callback https://www.drupal.org/node/2450793.
   */
  public function getLabelCallback();

  /**
   * Sets the label callback.
   *
   * @param callable $callback
   *   A callable that returns the label of the entity.
   *
   * @return $this
   *
   * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
   *   Use EntityInterface::label() for complex label generation as needed.
   *
   * @see \Drupal\Core\Entity\EntityInterface::label()
   * @see \Drupal\Core\Entity\EntityTypeInterface::getLabelCallback()
   * @see \Drupal\Core\Entity\EntityTypeInterface::hasLabelCallback()
   */
  public function setLabelCallback($callback);

  /**
   * Indicates if a label callback exists.
   *
   * @return bool
   *
   * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0.
   *   Use EntityInterface::label() for complex label generation as needed.
   *
   * @see \Drupal\Core\Entity\EntityInterface::label()
   * @see \Drupal\Core\Entity\EntityTypeInterface::getLabelCallback()
   * @see \Drupal\Core\Entity\EntityTypeInterface::setLabelCallback()
   */
  public function hasLabelCallback();

  /**
   * Gets the name of the entity type which provides bundles.
   *
   * @return string
   */
  public function getBundleEntityType();

  /**
   * Gets the entity type for which this entity provides bundles.
   *
   * It can be used by other modules to act accordingly; for example,
   * the Field UI module uses it to add operation links to manage fields and
   * displays.
   *
   * @return string|null
   *   The entity type for which this entity provides bundles, or NULL if does
   *   not provide bundles for another entity type.
   */
  public function getBundleOf();

  /**
   * Gets the label for the bundle.
   *
   * @return string|null
   *   The bundle label, or NULL if none exists.
   */
  public function getBundleLabel();

  /**
   * Gets the name of the entity's base table.
   *
   * @todo Used by SqlContentEntityStorage only.
   *
   * @return string|null
   *   The name of the entity's base table, or NULL if none exists.
   */
  public function getBaseTable();

  /**
   * Indicates whether entities of this type have multilingual support.
   *
   * At an entity level, this indicates language support and at a bundle level
   * this indicates translation support.
   *
   * @return bool
   */
  public function isTranslatable();

  /**
   * Indicates whether entities of this type have revision support.
   *
   * @return bool
   */
  public function isRevisionable();

  /**
   * Gets the name of the entity's revision data table.
   *
   * @todo Used by SqlContentEntityStorage only.
   *
   * @return string|null
   *   The name of the entity type's revision data table, or NULL if none
   *   exists.
   */
  public function getRevisionDataTable();

  /**
   * Gets the name of the entity's revision table.
   *
   * @todo Used by SqlContentEntityStorage only.
   *
   * @return string|null
   *   The name of the entity type's revision table, or NULL if none exists.
   */
  public function getRevisionTable();

  /**
   * Gets the name of the entity's data table.
   *
   * @todo Used by SqlContentEntityStorage only.
   *
   * @return string|null
   *   The name of the entity type's data table, or NULL if none exists.
   */
  public function getDataTable();

  /**
   * Gets the human-readable name of the entity type.
   *
   * @return string
   *   The human-readable name of the entity type.
   */
  public function getLabel();

  /**
   * Gets the lowercase form of the human-readable entity type name.
   *
   * @return string
   *   The lowercase form of the human-readable entity type name.
   */
  public function getLowercaseLabel();

  /**
   * Gets a callable that can be used to provide the entity URI.
   *
   * This is only called if there is no matching link template for the link
   * relationship type, and there is no bundle-specific callback provided.
   *
   * @return callable|null
   *   A valid callback that is passed the entity or NULL if none is specified.
   */
  public function getUriCallback();

  /**
   * Sets a callable to use to provide the entity URI.
   *
   * @param callable $callback
   *   A callback to use to provide a URI for the entity.
   *
   * @return $this
   */
  public function setUriCallback($callback);

  /**
   * Gets the machine name of the entity type group.
   *
   * @return string
   */
  public function getGroup();

  /**
   * Gets the human-readable name of the entity type group.
   *
   * @return string
   */
  public function getGroupLabel();

  /**
   * The list cache contexts associated with this entity type.
   *
   * Enables code listing entities of this type to ensure that rendered listings
   * are varied as necessary, typically to ensure users of role A see other
   * entities listed than users of role B.
   *
   * @return string[]
   */
  public function getListCacheContexts();

  /**
   * The list cache tags associated with this entity type.
   *
   * Enables code listing entities of this type to ensure that newly created
   * entities show up immediately.
   *
   * @return string[]
   */
  public function getListCacheTags();

  /**
   * Gets the key that is used to store configuration dependencies.
   *
   * @return string
   *   The key to be used in configuration dependencies when storing
   *   dependencies on entities of this type.
   */
  public function getConfigDependencyKey();

  /**
   * Indicates whether this entity type is commonly used as a reference target.
   *
   * @return bool
   *   TRUE if the entity type is a common reference; FALSE otherwise.
   */
  public function isCommonReferenceTarget();

  /**
   * Gets an array of validation constraints.
   *
   * See \Drupal\Core\TypedData\DataDefinitionInterface::getConstraints() for
   * details on how constraints are defined.
   *
   * @return array[]
   *   An array of validation constraint definitions, keyed by constraint name.
   *   Each constraint definition can be used for instantiating
   *   \Symfony\Component\Validator\Constraint objects.
   *
   * @see \Symfony\Component\Validator\Constraint
   */
  public function getConstraints();

  /**
   * Sets the array of validation constraints for the FieldItemList.
   *
   * NOTE: This will overwrite any previously set constraints. In most cases
   * ContentEntityTypeInterface::addConstraint() should be used instead.
   * See \Drupal\Core\TypedData\DataDefinitionInterface::getConstraints() for
   * details on how constraints are defined.
   *
   * @param array $constraints
   *   An array of validation constraint definitions, keyed by constraint name.
   *   Each constraint definition can be used for instantiating
   *   \Symfony\Component\Validator\Constraint objects.
   *
   * @return $this
   *
   * @see \Symfony\Component\Validator\Constraint
   */
  public function setConstraints(array $constraints);

  /**
   * Adds a validation constraint.
   *
   * See \Drupal\Core\TypedData\DataDefinitionInterface::getConstraints() for
   * details on how constraints are defined.
   *
   * @param string $constraint_name
   *   The name of the constraint to add, i.e. its plugin id.
   * @param array|null $options
   *   The constraint options as required by the constraint plugin, or NULL.
   *
   * @return $this
   */
  public function addConstraint($constraint_name, $options = NULL);

  /**
   * Gets the config dependency info for this entity, if any exists.
   *
   * @param string $bundle
   *   The bundle name.
   *
   * @return array
   *   An associative array containing the following keys:
   *   - 'type': The config dependency type (e.g. 'module', 'config').
   *   - 'name': The name of the config dependency.
   */
  public function getBundleConfigDependency($bundle);

}

Members

Namesort descending Modifiers Type Description Overrides
EntityTypeInterface::addConstraint public function Adds a validation constraint. 1
EntityTypeInterface::BUNDLE_MAX_LENGTH constant The maximum length of bundle name, in characters.
EntityTypeInterface::get public function Gets any arbitrary property. 1
EntityTypeInterface::getAccessControlClass public function Gets the access control class. 1
EntityTypeInterface::getAdminPermission public function Gets the name of the default administrative permission. 1
EntityTypeInterface::getBaseTable public function Gets the name of the entity's base table. 1
EntityTypeInterface::getBundleConfigDependency public function Gets the config dependency info for this entity, if any exists. 1
EntityTypeInterface::getBundleEntityType public function Gets the name of the entity type which provides bundles. 1
EntityTypeInterface::getBundleLabel public function Gets the label for the bundle. 1
EntityTypeInterface::getBundleOf public function Gets the entity type for which this entity provides bundles. 1
EntityTypeInterface::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. 1
EntityTypeInterface::getConstraints public function Gets an array of validation constraints. 1
EntityTypeInterface::getDataTable public function Gets the name of the entity's data table. 1
EntityTypeInterface::getFormClass public function Gets the form class for a specific operation. 1
EntityTypeInterface::getGroup public function Gets the machine name of the entity type group. 1
EntityTypeInterface::getGroupLabel public function Gets the human-readable name of the entity type group. 1
EntityTypeInterface::getHandlerClass public function 1
EntityTypeInterface::getHandlerClasses public function Gets an array of handlers. 1
EntityTypeInterface::getKey public function Gets a specific entity key. 1
EntityTypeInterface::getKeys public function Gets an array of entity keys. 1
EntityTypeInterface::getLabel public function Gets the human-readable name of the entity type. 1
EntityTypeInterface::getLabelCallback Deprecated public function Gets the callback for the label of the entity. 1
EntityTypeInterface::getLinkTemplate public function Gets the link template for a given key. 1
EntityTypeInterface::getLinkTemplates public function Gets the link templates using the URI template syntax. 1
EntityTypeInterface::getListBuilderClass public function Gets the list class. 1
EntityTypeInterface::getListCacheContexts public function The list cache contexts associated with this entity type. 1
EntityTypeInterface::getListCacheTags public function The list cache tags associated with this entity type. 1
EntityTypeInterface::getLowercaseLabel public function Gets the lowercase form of the human-readable entity type name. 1
EntityTypeInterface::getOriginalClass public function Gets the name of the original entity type class. 1
EntityTypeInterface::getPermissionGranularity public function Gets the permission granularity level. 1
EntityTypeInterface::getProvider public function Gets the name of the provider of this entity type. 1
EntityTypeInterface::getRevisionDataTable public function Gets the name of the entity's revision data table. 1
EntityTypeInterface::getRevisionTable public function Gets the name of the entity's revision table. 1
EntityTypeInterface::getRouteProviderClasses public function Gets all the route provide handlers. 1
EntityTypeInterface::getStorageClass public function Gets the storage class. 1
EntityTypeInterface::getUriCallback public function Gets a callable that can be used to provide the entity URI. 1
EntityTypeInterface::getViewBuilderClass public function Gets the view builder class. 1
EntityTypeInterface::hasFormClasses public function Indicates if this entity type has any forms. 1
EntityTypeInterface::hasHandlerClass public function Determines if there is a handler for a given type. 1
EntityTypeInterface::hasKey public function Indicates if a given entity key exists. 1
EntityTypeInterface::hasLabelCallback Deprecated public function Indicates if a label callback exists. 1
EntityTypeInterface::hasLinkTemplate public function Indicates if a link template exists for a given key. 1
EntityTypeInterface::hasListBuilderClass public function Indicates if this entity type has a list class. 1
EntityTypeInterface::hasRouteProviders public function Indicates if this entity type has any route provider. 1
EntityTypeInterface::hasViewBuilderClass public function Indicates if this entity type has a view builder. 1
EntityTypeInterface::id public function Gets the unique identifier of the entity type. 1
EntityTypeInterface::ID_MAX_LENGTH constant The maximum length of ID, in characters.
EntityTypeInterface::isCommonReferenceTarget public function Indicates whether this entity type is commonly used as a reference target. 1
EntityTypeInterface::isPersistentlyCacheable public function Indicates if the persistent cache of field data should be used. 1
EntityTypeInterface::isRenderCacheable public function Indicates whether the rendered output of entities should be cached. 1
EntityTypeInterface::isRevisionable public function Indicates whether entities of this type have revision support. 1
EntityTypeInterface::isStaticallyCacheable public function Indicates whether entities should be statically cached. 1
EntityTypeInterface::isSubclassOf public function Indicates if the entity type is a subclass of the given class or interface. 1
EntityTypeInterface::isTranslatable public function Indicates whether entities of this type have multilingual support. 1
EntityTypeInterface::set public function Sets a value to an arbitrary property. 1
EntityTypeInterface::setAccessClass public function Gets the access class. 1
EntityTypeInterface::setConstraints public function Sets the array of validation constraints for the FieldItemList. 1
EntityTypeInterface::setFormClass public function Sets a form class for a specific operation. 1
EntityTypeInterface::setHandlerClass public function Sets the handlers for a given type. 1
EntityTypeInterface::setLabelCallback Deprecated public function Sets the label callback. 1
EntityTypeInterface::setLinkTemplate public function Sets a single link template. 1
EntityTypeInterface::setListBuilderClass public function Sets the list class. 1
EntityTypeInterface::setStorageClass public function Sets the storage class. 1
EntityTypeInterface::setUriCallback public function Sets a callable to use to provide the entity URI. 1
EntityTypeInterface::setViewBuilderClass public function Gets the view builder class. 1
PluginDefinitionInterface::getClass public function Gets the class. 1
PluginDefinitionInterface::setClass public function Sets the class. 1