EntityTypeBundleInfoInterface.php 1.05 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
<?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
14 15 16 17
   *   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.
18 19 20 21 22 23
   */
  public function getAllBundleInfo();

  /**
   * Gets the bundle info of an entity type.
   *
24 25
   * @param string $entity_type_id
   *   The entity type ID.
26 27
   *
   * @return array
28 29 30 31
   *   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.
32
   */
33
  public function getBundleInfo($entity_type_id);
34 35 36 37 38 39 40

  /**
   * Clears static and persistent bundles.
   */
  public function clearCachedBundles();

}