Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
ActiveLinkResponseFilter | class | Drupal\Core\EventSubscriber | core/ |
Subscribes to filter HTML responses, to set attributes on active links. | ||||
ActiveTheme | class | Drupal\Core\Theme | core/ |
Defines a theme and its information needed at runtime. | 1 | |||
ActiveWorkspaceCheck | class | Drupal\workspaces\Access | core/ |
Determines access to routes based on the presence of an active workspace. | 2 | |||
ActualValueIsNotAnObjectException | final class | PHPUnit\Framework | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
AddAnnotatedClassesToCachePass | since Symfony 7.1, to be removed in 8.0 |
class | Symfony\Component\HttpKernel\DependencyInjection | vendor/ |
Sets the classes to compile in the cache for the container. | |||
AddAutoMappingConfigurationPass | class | Symfony\Component\Validator\DependencyInjection | vendor/ |
Injects the automapping configuration as last argument of loaders tagged with the "validator.auto_mapper" tag. | ||||
AddBinary | class | Twig\Node\Expression\Binary | vendor/ |
1 | ||||
AddBlockForm | class | Drupal\layout_builder\Form | core/ |
Provides a form to add a block. | 1 | |||
AddConsoleCommandPass | class | Symfony\Component\Console\DependencyInjection | vendor/ |
Registers console commands. | ||||
AddConstraintValidatorsPass | class | Symfony\Component\Validator\DependencyInjection | vendor/ |
@author Johannes M. Schmitt <schmittjoh@gmail.com> @author Robin Chalas <robin.chalas@gmail.com> | ||||
AddCssCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for adding css to the page via ajax. | ||||
AddEventAliasesPass | class | Symfony\Component\EventDispatcher\DependencyInjection | vendor/ |
This pass allows bundles to extend the list of event aliases. | ||||
AddExpressionLanguageProvidersPass | class | Symfony\Component\Routing\DependencyInjection | vendor/ |
Registers the expression language providers. | ||||
AddFormBase | abstract class | Drupal\media_library\Form | core/ |
Provides a base class for creating media items from within the media library. | 2 | |||
AddHandler | class | Drupal\views_ui\Form\Ajax | core/ |
Provides a form for adding an item in the Views UI. | ||||
AddItemToToolbar | final class | Drupal\ckeditor5\Plugin\ConfigAction | core/ |
|||||
AddJsCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for adding JS to the page via AJAX. | ||||
AddMimeTypeGuesserPass | class | Symfony\Component\Mime\DependencyInjection | vendor/ |
Registers custom mime types guessers. | ||||
AddModeration | final class | Drupal\content_moderation\Plugin\ConfigAction | core/ |
|||||
AddModerationDeriver | final class | Drupal\content_moderation\Plugin\ConfigAction | core/ |
|||||
AddNavigationBlock | final class | Drupal\navigation\Plugin\ConfigAction | core/ |
@internal This API is experimental. | ||||
AddRequestFormatsListener | class | Symfony\Component\HttpKernel\EventListener | vendor/ |
Adds configured formats to each request. | ||||
Address | final class | Symfony\Component\Mime | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 12 | |||
AddressEncoderException | class | Symfony\Component\Mime\Exception | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 1 | |||
AddressEncoderInterface | interface | Symfony\Component\Mime\Encoder | vendor/ |
@author Christian Schmidt | 1 | |||
AddressLiteral | class | Egulias\EmailValidator\Warning | vendor/ |
1 | ||||
AddRoleUser | class | Drupal\user\Plugin\Action | core/ |
Adds a role to a user. | ||||
AddSectionController | class | Drupal\layout_builder\Controller | core/ |
Defines a controller to add a new section. | ||||
AddToAllBundles | final class | Drupal\field\Plugin\ConfigAction | core/ |
Adds a field to all bundles of its target entity type. | ||||
AddTrait | trait | Symfony\Component\Routing\Loader\Configurator\Traits | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | ||||
AddValidatorInitializersPass | class | Symfony\Component\Validator\DependencyInjection | vendor/ |
@author Fabien Potencier <fabien@symfony.com> @author Robin Chalas <robin.chalas@gmail.com> | ||||
AdminAccountSwitcher | final class | Drupal\Core\DefaultContent | core/ |
@internal This API is experimental. | ||||
AdminContext | class | Drupal\Core\Routing | core/ |
Provides a helper class to determine whether the route is an admin one. | 4 | |||
AdminController | class | Drupal\system\Controller | core/ |
Controller for admin section. | ||||
AdminDemoNegotiator | class | Drupal\block\Theme | core/ |
Negotiates the theme for the block admin demo page via the URL. | 2 | |||
AdminHtmlRouteProvider | class | Drupal\Core\Entity\Routing | core/ |
Provides HTML routes for entities with administrative add/edit/delete pages. | 2 | 6 | ||
AdminNegotiator | class | Drupal\user\Theme | core/ |
Sets the active theme on admin pages. | 2 | |||
AdminPathConfigEntityConverter | class | Drupal\Core\ParamConverter | core/ |
Makes sure the unmodified ConfigEntity is loaded on admin pages. | 1 | 1 | ||
AdminPathConfigEntityConverter | class | Drupal\Core\ProxyClass\ParamConverter | core/ |
Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter. | ||||
AdminRouteSubscriber | class | Drupal\system\EventSubscriber | core/ |
Adds the _admin_route option to each admin HTML route. | 2 | |||
AdvancedNameConverterInterface | since Symfony 7.2, use NameConverterInterface instead |
interface | Symfony\Component\Serializer\NameConverter | vendor/ |
Gives access to the class, the format and the context in the property name converters. | 1 | ||
AdvancedSettingsForm | class | Drupal\views_ui\Form | core/ |
Form builder for the advanced admin settings page. | 1 | |||
AdvisoriesConfigSubscriber | class | Drupal\system\EventSubscriber | core/ |
Defines a config subscriber for changes to 'system.advisories'. | 2 | |||
AdvisoryProviderInterface | interface | Composer\Repository | vendor/ |
Repositories that allow fetching security advisory data | 2 | |||
After | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | ||||
After | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 2 | |||
AfterClass | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | ||||
AfterClass | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
AfterCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for calling the jQuery after() method. | ||||
AfterLastTestMethodCalled | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable |