EntityTypeBundleInfoInterface.php

Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php
  2. 10 core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php
  3. 11.x core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php

Namespace

Drupal\Core\Entity

File

core/lib/Drupal/Core/Entity/EntityTypeBundleInfoInterface.php

View source
<?php

namespace Drupal\Core\Entity;


/**
 * Provides an interface for an entity type bundle info.
 */
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();

}

Interfaces

Title Deprecated Summary
EntityTypeBundleInfoInterface Provides an interface for an entity type bundle info.

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