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 Namespacesort descending Location Description Direct uses Use statements Strings
ContainerAwareEventDispatcher Deprecated class Drupal\Component\EventDispatcher core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php A performance optimized container aware event dispatcher. 1
Event class Drupal\Component\EventDispatcher core/lib/Drupal/Component/EventDispatcher/Event.php Provides a forward-compatibility layer for the Symfony 5 event class. 25 29
ApcuFileCacheBackend class Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/ApcuFileCacheBackend.php APCu backend for the file cache.
FileCache class Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/FileCache.php Allows to cache data based on file modification dates. 1 2
FileCacheBackendInterface interface Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/FileCacheBackendInterface.php Defines an interface inspired by APCu for FileCache backends. 2 1
FileCacheFactory class Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/FileCacheFactory.php Creates a FileCache object. 21
FileCacheInterface interface Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/FileCacheInterface.php Interface for objects that allow caching file data. 2
NullFileCache class Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/NullFileCache.php Null implementation for the file cache. 1
FileSecurity class Drupal\Component\FileSecurity core/lib/Drupal/Component/FileSecurity/FileSecurity.php Provides file security functions. 5
FileSystem class Drupal\Component\FileSystem core/lib/Drupal/Component/FileSystem/FileSystem.php Provides file system functions. 4
RegexDirectoryIterator class Drupal\Component\FileSystem core/lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php Iterates over files whose names match a regular expression in a directory. 3
FrontMatter class Drupal\Component\FrontMatter core/lib/Drupal/Component/FrontMatter/FrontMatter.php Component for parsing front matter from a source. 5
FrontMatterParseException class Drupal\Component\FrontMatter\Exception core/lib/Drupal/Component/FrontMatter/Exception/FrontMatterParseException.php Defines a class for front matter parsing exceptions. 3
PoHeader class Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoHeader.php Gettext PO header handler. 5
PoItem class Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoItem.php PoItem handles one translation. 15
PoMemoryWriter class Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoMemoryWriter.php Defines a Gettext PO memory writer, to be used by the installer. 1
PoMetadataInterface interface Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoMetadataInterface.php Methods required for both reader and writer implementations. 2
PoReaderInterface interface Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoReaderInterface.php Shared interface definition for all Gettext PO Readers. 2 2
PoStreamInterface interface Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoStreamInterface.php Common functions for file/stream based PO readers/writers. 2
PoStreamReader class Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoStreamReader.php Implements Gettext PO stream reader. 2
PoStreamWriter class Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoStreamWriter.php Defines a Gettext PO stream writer. 2
PoWriterInterface interface Drupal\Component\Gettext core/lib/Drupal/Component/Gettext/PoWriterInterface.php Shared interface definition for all Gettext PO Writers. 3 1
Graph class Drupal\Component\Graph core/lib/Drupal/Component/Graph/Graph.php Directed acyclic graph manipulation. 6
FileReadOnlyStorage class Drupal\Component\PhpStorage core/lib/Drupal/Component/PhpStorage/FileReadOnlyStorage.php Reads code as regular PHP files, but won't write them. 1
FileStorage class Drupal\Component\PhpStorage core/lib/Drupal/Component/PhpStorage/FileStorage.php Stores the code as regular PHP files. 1 2
MTimeProtectedFastFileStorage class Drupal\Component\PhpStorage core/lib/Drupal/Component/PhpStorage/MTimeProtectedFastFileStorage.php Stores PHP code in files with securely hashed names. 1
MTimeProtectedFileStorage class Drupal\Component\PhpStorage core/lib/Drupal/Component/PhpStorage/MTimeProtectedFileStorage.php Stores PHP code in files with securely hashed names. 1
PhpStorageInterface interface Drupal\Component\PhpStorage core/lib/Drupal/Component/PhpStorage/PhpStorageInterface.php Stores and loads PHP code. 2 1
CategorizingPluginManagerInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/CategorizingPluginManagerInterface.php Defines an interface for plugin managers that categorize plugin definitions. 6 6
ConfigurableInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/ConfigurableInterface.php Provides an interface for a configurable plugin. 16 23
ContextAwarePluginInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php Interface for defining context aware plugins. 1 1
DependentPluginInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/DependentPluginInterface.php Provides an interface for a plugin that has dependencies. 18 20
DerivativeInspectionInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php Provides a plugin interface for providing derivative metadata inspection. 7 10
FallbackPluginManagerInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/FallbackPluginManagerInterface.php An interface implemented by plugin managers with fallback plugin behaviors. 5 7
LazyPluginCollection abstract class Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/LazyPluginCollection.php Defines an object which stores multiple plugin instances to lazy load them. 3 3
PluginAwareInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginAwareInterface.php Provides an interface for objects that depend on a plugin. 4 6
PluginBase abstract class Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginBase.php Base class for plugins wishing to support metadata inspection. 12 20
PluginHelper Deprecated class Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginHelper.php A helper class to determine if a plugin is configurable. 1
PluginInspectionInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginInspectionInterface.php Plugin interface for providing some metadata inspection. 32 40
PluginManagerBase abstract class Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginManagerBase.php Base class for plugin managers. 5 8
PluginManagerInterface interface Drupal\Component\Plugin core/lib/Drupal/Component/Plugin/PluginManagerInterface.php Interface implemented by plugin managers. 19 39
AttributeInterface interface Drupal\Component\Plugin\Attribute core/lib/Drupal/Component/Plugin/Attribute/AttributeInterface.php Defines a common interface for classed attributes. 1
PluginID class Drupal\Component\Plugin\Attribute core/lib/Drupal/Component/Plugin/Attribute/PluginID.php 6 9
Context class Drupal\Component\Plugin\Context core/lib/Drupal/Component/Plugin/Context/Context.php A generic context class for wrapping data a plugin needs to operate. 1 2
ContextDefinitionInterface interface Drupal\Component\Plugin\Context core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php Interface used to define definition objects found in ContextInterface. 1 4
ContextInterface interface Drupal\Component\Plugin\Context core/lib/Drupal/Component/Plugin/Context/ContextInterface.php Provides data and definitions for plugins during runtime and administration. 2 7
ContextAwarePluginDefinitionInterface interface Drupal\Component\Plugin\Definition core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionInterface.php Provides an interface for plugin definitions which use contexts. 4 6
ContextAwarePluginDefinitionTrait trait Drupal\Component\Plugin\Definition core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php Provides a trait for context-aware object-based plugin definitions. 4
DerivablePluginDefinitionInterface interface Drupal\Component\Plugin\Definition core/lib/Drupal/Component/Plugin/Definition/DerivablePluginDefinitionInterface.php Provides an interface for a derivable plugin definition. 2 3
PluginDefinition class Drupal\Component\Plugin\Definition core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php 8 8

Pages

Other projects