Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

BundleEntityStorageInterface.php

Namespace

Drupal\Core\Entity

File

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

View source
<?php

namespace Drupal\Core\Entity;


/**
 * A storage that supports entities with bundle specific classes.
 */
interface BundleEntityStorageInterface {
    
    /**
     * Retrieves the bundle name for a provided class name.
     *
     * @param string $class_name
     *   The class name to check.
     *
     * @return string|null
     *   The bundle name of the class provided or NULL if unable to determine the
     *   bundle from the provided class.
     *
     * @throws \Drupal\Core\Entity\Exception\AmbiguousBundleClassException
     *   Thrown when multiple bundles are using the provided class.
     */
    public function getBundleFromClass(string $class_name) : ?string;

}

Interfaces

Title Deprecated Summary
BundleEntityStorageInterface A storage that supports entities with bundle specific classes.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal