interface EntityTypeBundleInfoInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php \Drupal\Core\Entity\EntityTypeBundleInfoInterface
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php \Drupal\Core\Entity\EntityTypeBundleInfoInterface
  3. 10 core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php \Drupal\Core\Entity\EntityTypeBundleInfoInterface

Provides an interface for an entity type bundle info.

Hierarchy

Expanded class hierarchy of EntityTypeBundleInfoInterface

All classes that implement EntityTypeBundleInfoInterface

65 files declare their use of EntityTypeBundleInfoInterface
AccountForm.php in core/modules/user/src/AccountForm.php
AddToAllBundles.php in core/modules/field/src/Plugin/ConfigAction/AddToAllBundles.php
BookOutlineForm.php in core/modules/book/src/Form/BookOutlineForm.php
Bundle.php in core/modules/views/src/Plugin/views/filter/Bundle.php
CommentForm.php in core/modules/comment/src/CommentForm.php

... See full list

File

core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php, line 8

Namespace

Drupal\Core\Entity
View source
interface EntityTypeBundleInfoInterface {
    
    /**
     * Get the bundle info of all entity types.
     *
     * @return array
     *   An array of bundle information where the outer array is keyed by entity
     *   type. The next level is keyed by the bundle name. The inner arrays are
     *   associative arrays of bundle information, such as the label for the
     *   bundle.
     */
    public function getAllBundleInfo();
    
    /**
     * Gets the bundle info of an entity type.
     *
     * @param string $entity_type_id
     *   The entity type ID.
     *
     * @return array
     *   An array of bundle information where the outer array is keyed by the
     *   bundle name, or the entity type name if the entity does not have bundles.
     *   The inner arrays are associative arrays of bundle information, such as
     *   the label for the bundle.
     */
    public function getBundleInfo($entity_type_id);
    
    /**
     * Clears static and persistent bundles.
     */
    public function clearCachedBundles();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
EntityTypeBundleInfoInterface::clearCachedBundles public function Clears static and persistent bundles. 1
EntityTypeBundleInfoInterface::getAllBundleInfo public function Get the bundle info of all entity types. 1
EntityTypeBundleInfoInterface::getBundleInfo public function Gets the bundle info of an entity type. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.