Primary tabs

Introduction to classes

A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.

See also

Objected-oriented programming conventions

Name Type Namespace Locationsort descending Description Direct uses Use statements Strings
LibraryDependencyResolverInterface interface Drupal\Core\Asset core/lib/Drupal/Core/Asset/LibraryDependencyResolverInterface.php Resolves the dependencies of asset (CSS/JavaScript) libraries. 1
LibraryDiscovery class Drupal\Core\Asset core/lib/Drupal/Core/Asset/LibraryDiscovery.php Discovers available asset libraries in Drupal. 1 2
LibraryDiscoveryCollector class Drupal\Core\Asset core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php A CacheCollector implementation for building library extension info. 1 2
LibraryDiscoveryInterface interface Drupal\Core\Asset core/lib/Drupal/Core/Asset/LibraryDiscoveryInterface.php Discovers information for asset (CSS/JavaScript) libraries. 1
AuthenticationCollector class Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationCollector.php A collector class for authentication providers. 2 2
AuthenticationCollectorInterface interface Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationCollectorInterface.php Interface for collectors of registered authentication providers. 1
AuthenticationManager class Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationManager.php Manager for authentication. 1 2
AuthenticationProviderChallengeInterface interface Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php Generate a challenge when access is denied for unauthenticated users. 1 1
AuthenticationProviderFilterInterface interface Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationProviderFilterInterface.php Restrict authentication methods to a subset of the site. 2 2
AuthenticationProviderInterface interface Drupal\Core\Authentication core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php Interface for authentication providers. 7 7
BatchBuilder class Drupal\Core\Batch core/lib/Drupal/Core/Batch/BatchBuilder.php Builds an array for a batch process. 15
BatchStorageInterface interface Drupal\Core\Batch core/lib/Drupal/Core/Batch/BatchStorageInterface.php Defines a common interface for batch storage operations. 1 3
Percentage class Drupal\Core\Batch core/lib/Drupal/Core/Batch/Percentage.php Helper methods for the batch system. 2
Block class Drupal\Core\Block\Annotation core/lib/Drupal/Core/Block/Annotation/Block.php Defines a Block annotation object.
BlockBase abstract class Drupal\Core\Block core/lib/Drupal/Core/Block/BlockBase.php Defines a base block implementation that most blocks plugins will extend. 4 5
BlockManager class Drupal\Core\Block core/lib/Drupal/Core/Block/BlockManager.php Manages discovery and instantiation of block plugins. 1 2
BlockManagerInterface interface Drupal\Core\Block core/lib/Drupal/Core/Block/BlockManagerInterface.php Provides an interface for the discovery and instantiation of block plugins. 1 8
BlockPluginInterface interface Drupal\Core\Block core/lib/Drupal/Core/Block/BlockPluginInterface.php Defines the required interface for all block plugins. 5 16 1
BlockPluginTrait trait Drupal\Core\Block core/lib/Drupal/Core/Block/BlockPluginTrait.php Provides the base implementation of a block plugin.
MainContentBlockPluginInterface interface Drupal\Core\Block core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php The interface for "main page content" blocks. 1
MessagesBlockPluginInterface interface Drupal\Core\Block core/lib/Drupal/Core/Block/MessagesBlockPluginInterface.php The interface for "messages" (#type => status_messages) blocks.
TitleBlockPluginInterface interface Drupal\Core\Block core/lib/Drupal/Core/Block/TitleBlockPluginInterface.php The interface for "title" blocks. 1
Breadcrumb class Drupal\Core\Breadcrumb core/lib/Drupal/Core/Breadcrumb/Breadcrumb.php Used to return generated breadcrumbs with associated cacheability metadata. 12
BreadcrumbBuilderInterface interface Drupal\Core\Breadcrumb core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php Defines an interface for classes that build breadcrumbs. 7 6
BreadcrumbManager class Drupal\Core\Breadcrumb core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php Provides a breadcrumb manager. 1 2
ChainBreadcrumbBuilderInterface interface Drupal\Core\Breadcrumb core/lib/Drupal/Core/Breadcrumb/ChainBreadcrumbBuilderInterface.php Defines an interface a chained service that builds the breadcrumb. 1
BackendChain class Drupal\Core\Cache core/lib/Drupal/Core/Cache/BackendChain.php Defines a chained cache implementation for combining multiple cache backends. 2 4
Cache class Drupal\Core\Cache core/lib/Drupal/Core/Cache/Cache.php Helper methods for cache. 155
CacheableAjaxResponse class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableAjaxResponse.php A AjaxResponse that contains and can expose cacheability metadata. 1
CacheableDependencyInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableDependencyInterface.php Defines an interface for objects which may be used by other cached objects. 47 68
CacheableDependencyTrait trait Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableDependencyTrait.php Trait for \Drupal\Core\Cache\CacheableDependencyInterface. 22
CacheableJsonResponse class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableJsonResponse.php A JsonResponse that contains and can expose cacheability metadata. 5
CacheableMetadata class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableMetadata.php Defines a generic class for passing cacheability metadata. 2 129
CacheableRedirectResponse class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableRedirectResponse.php A RedirectResponse that contains and can expose cacheability metadata. 2
CacheableResponse class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableResponse.php A response that contains and can expose cacheability metadata. 1 9
CacheableResponseInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableResponseInterface.php Defines an interface for responses that can expose cacheability metadata. 8 19
CacheableResponseTrait trait Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheableResponseTrait.php Provides an implementation of CacheableResponseInterface. 5
CacheBackendInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheBackendInterface.php Defines an interface for cache implementations. 5 86 27
CacheCollector abstract class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheCollector.php Default implementation for CacheCollectorInterface. 7 7
CacheCollectorInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheCollectorInterface.php Provides a caching wrapper to be used in place of large structures. 3 2
CacheFactoryInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheFactoryInterface.php An interface defining cache factory classes. 2 2
CacheRedirect class Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheRedirect.php Defines a value object to represent a cache redirect. 2
CacheTagsChecksumInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheTagsChecksumInterface.php Provides checksums for cache tag invalidations. 1
CacheTagsChecksumTrait trait Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php A trait for cache tag checksum implementations.
CacheTagsInvalidatorInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/CacheTagsInvalidatorInterface.php Defines required methods for classes wanting to handle cache tag changes. 5 12
ChainedFastBackend class Drupal\Core\Cache core/lib/Drupal/Core/Cache/ChainedFastBackend.php Defines a backend with a fast and a consistent backend chain. 2
AccountPermissionsCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/AccountPermissionsCacheContext.php Defines the AccountPermissionsCacheContext service, for "per permission" caching. 2
CacheContextInterface interface Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php Provides an interface for defining a cache context service. 21 6
CacheContextsPass class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/CacheContextsPass.php Adds cache_contexts parameter to the container. 1
CalculatedCacheContextInterface interface Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php Provides an interface for defining a calculated cache context service. 9 3

Pages

Other projects