You are here

interface EntityUsageSourceLevelInterface in Entity Usage 8.3

Defines the interface for the service managing top-level source entities.

Hierarchy

Expanded class hierarchy of EntityUsageSourceLevelInterface

All classes that implement EntityUsageSourceLevelInterface

File

src/EntityUsageSourceLevelInterface.php, line 10

Namespace

Drupal\entity_usage
View source
interface EntityUsageSourceLevelInterface {

  /**
   * Checks whether an entity is a top-level entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity object we are dealing with.
   *
   * @return bool
   *   TRUE if the entity passed in is a top-level entity, FALSE otherwise.
   */
  public static function isTopLevel(EntityInterface $entity);

  /**
   * Checks whether an entity is a middle-level entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity object we are dealing with.
   *
   * @return bool
   *   TRUE if the entity passed in is a middle-level entity, FALSE otherwise.
   */
  public static function isMiddleLevel(EntityInterface $entity);

  /**
   * Checks whether an entity is a bottom-level entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity object we are dealing with.
   *
   * @return bool
   *   TRUE if the entity passed in is a bottom-level entity, FALSE otherwise.
   */
  public static function isBottomLevel(EntityInterface $entity);

  /**
   * Returns all entity type names that are defined as top-level (sources).
   *
   * @return string[]
   *   An indexed array of top-level entity type machine names.
   */
  public static function getTopLevelEntityTypes();

  /**
   * Returns all entity type names that are defined as middle-level.
   *
   * @return string[]
   *   An indexed array of middle-level entity type machine names.
   */
  public static function getMiddleLevelEntityTypes();

  /**
   * Returns all entity type names that are defined as bottom-level (targets).
   *
   * @return string[]
   *   An indexed array of bottom-level entity type machine names.
   */
  public static function getBottomLevelEntityTypes();

}

Members

Namesort descending Modifiers Type Description Overrides
EntityUsageSourceLevelInterface::getBottomLevelEntityTypes public static function Returns all entity type names that are defined as bottom-level (targets). 1
EntityUsageSourceLevelInterface::getMiddleLevelEntityTypes public static function Returns all entity type names that are defined as middle-level. 1
EntityUsageSourceLevelInterface::getTopLevelEntityTypes public static function Returns all entity type names that are defined as top-level (sources). 1
EntityUsageSourceLevelInterface::isBottomLevel public static function Checks whether an entity is a bottom-level entity. 1
EntityUsageSourceLevelInterface::isMiddleLevel public static function Checks whether an entity is a middle-level entity. 1
EntityUsageSourceLevelInterface::isTopLevel public static function Checks whether an entity is a top-level entity. 1