Classes, traits, and interfaces - 8.9.x - drupal

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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
AddCssCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AddCssCommand.php An AJAX command for adding css to the page via ajax. 3
AddFeedTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/AddFeedTest.php Add feed test.
AddFeedTest class Drupal\Tests\system\Kernel\Common core/modules/system/tests/src/Kernel/Common/AddFeedTest.php Make sure that attaching feeds works correctly with various constructs.
AddFormBase abstract class Drupal\media_library\Form core/modules/media_library/src/Form/AddFormBase.php Provides a base class for creating media items from within the media library. 3 1
AddHandler class Drupal\views_ui\Form\Ajax core/modules/views_ui/src/Form/Ajax/AddHandler.php Provides a form for adding an item in the Views UI.
AddRoleUser class Drupal\user\Plugin\Action core/modules/user/src/Plugin/Action/AddRoleUser.php Adds a role to a user. 1
AddRoleUserTest class Drupal\Tests\user\Unit\Plugin\Action core/modules/user/tests/src/Unit/Plugin/Action/AddRoleUserTest.php @coversDefaultClass \Drupal\user\Plugin\Action\AddRoleUser @group user
AddSectionController class Drupal\layout_builder\Controller core/modules/layout_builder/src/Controller/AddSectionController.php Defines a controller to add a new section.
AddStyleSheetCommand class Drupal\ckeditor\Ajax core/modules/ckeditor/src/Ajax/AddStyleSheetCommand.php AJAX command to add style sheets to a CKEditor instance. 1
AdminContext class Drupal\Core\Routing core/lib/Drupal/Core/Routing/AdminContext.php Provides a helper class to determine whether the route is an admin one. 5 2
AdminController class Drupal\system\Controller core/modules/system/src/Controller/AdminController.php Controller for admin section.
AdminDemoNegotiator class Drupal\block\Theme core/modules/block/src/Theme/AdminDemoNegotiator.php Negotiates the theme for the block admin demo page via the URL. 2
AdminHtmlRouteProvider class Drupal\Core\Entity\Routing core/lib/Drupal/Core/Entity/Routing/AdminHtmlRouteProvider.php Provides HTML routes for entities with administrative add/edit/delete pages. 3 4
AdminMetaTagTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php Confirm that the fingerprinting meta tag appears as expected.
AdminNegotiator class Drupal\user\Theme core/modules/user/src/Theme/AdminNegotiator.php Sets the active theme on admin pages. 1 2
AdminNegotiatorTest class Drupal\Tests\user\Unit\Theme core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php Tests AdminNegotiator class.
AdminPathConfigEntityConverter class Drupal\Core\ProxyClass\ParamConverter core/lib/Drupal/Core/ProxyClass/ParamConverter/AdminPathConfigEntityConverter.php Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter.
AdminPathConfigEntityConverter class Drupal\Core\ParamConverter core/lib/Drupal/Core/ParamConverter/AdminPathConfigEntityConverter.php Makes sure the unmodified ConfigEntity is loaded on admin pages. 1 1 2
AdminPathEntityConverterLanguageTest class Drupal\Tests\language\Functional core/modules/language/tests/src/Functional/AdminPathEntityConverterLanguageTest.php Test administration path based conversion of entities. 1 1
AdminRouteSubscriber class Drupal\system\EventSubscriber core/modules/system/src/EventSubscriber/AdminRouteSubscriber.php Adds the _admin_route option to each admin HTML route. 1 2
AdminRouteSubscriberTest class Drupal\Tests\system\Unit\Routing core/modules/system/tests/src/Unit/Routing/AdminRouteSubscriberTest.php @coversDefaultClass \Drupal\system\EventSubscriber\AdminRouteSubscriber @group system
AdminTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/AdminTest.php Tests output on administrative pages and compact mode functionality.
AdminThemeUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/AdminThemeUpdateTest.php Tests system.theme:admin is updated.
AdvancedSettingsForm class Drupal\views_ui\Form core/modules/views_ui/src/Form/AdvancedSettingsForm.php Form builder for the advanced admin settings page. 1
AfterCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/AfterCommand.php An AJAX command for calling the jQuery after() method. 2
AfterSymfonyListener class Drupal\TestTools\PhpUnitCompatibility\PhpUnit6 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit6/AfterSymfonyListener.php Listens to PHPUnit test runs.
AfterSymfonyListener class Drupal\TestTools\PhpUnitCompatibility\PhpUnit7 core/tests/Drupal/TestTools/PhpUnitCompatibility/PhpUnit7/AfterSymfonyListener.php Listens to PHPUnit test runs.
AggregatorAdminTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php Tests aggregator admin pages.
AggregatorController class Drupal\aggregator\Controller core/modules/aggregator/src/Controller/AggregatorController.php Returns responses for aggregator module routes.
AggregatorCronTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php Update feeds on cron.
AggregatorDisplayConfigurableTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/AggregatorDisplayConfigurableTest.php Tests making aggregator_feed and aggregator_item base fields' displays configurable.
AggregatorFeed class Drupal\aggregator\Plugin\migrate\source core/modules/aggregator/src/Plugin/migrate/source/AggregatorFeed.php Drupal feed source from database.
AggregatorFeedBlock class Drupal\aggregator\Plugin\Block core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php Provides an 'Aggregator feed' block with the latest items from the feed.
AggregatorFeedTest class Drupal\Tests\aggregator\Kernel\Plugin\migrate\source core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorFeedTest.php Tests D6 aggregator feed source plugin.
AggregatorFeedViewsData class Drupal\aggregator core/modules/aggregator/src/AggregatorFeedViewsData.php Provides the views data for the aggregator feed entity type.
AggregatorFeedViewsFieldAccessTest class Drupal\Tests\aggregator\Kernel\Views core/modules/aggregator/tests/src/Kernel/Views/AggregatorFeedViewsFieldAccessTest.php Tests base field access in Views for the aggregator_feed entity.
AggregatorFetcher class Drupal\aggregator\Annotation core/modules/aggregator/src/Annotation/AggregatorFetcher.php Defines a Plugin annotation object for aggregator fetcher plugins.
AggregatorItem class Drupal\aggregator\Plugin\migrate\source core/modules/aggregator/src/Plugin/migrate/source/AggregatorItem.php Drupal aggregator item source from database.
AggregatorItemTest class Drupal\Tests\aggregator\Kernel\Plugin\migrate\source core/modules/aggregator/tests/src/Kernel/Plugin/migrate/source/AggregatorItemTest.php Tests aggregator item source plugin.
AggregatorItemViewsData class Drupal\aggregator core/modules/aggregator/src/AggregatorItemViewsData.php Provides the views data for the aggregator item entity type.
AggregatorItemViewsFieldAccessTest class Drupal\Tests\aggregator\Kernel\Views core/modules/aggregator/tests/src/Kernel/Views/AggregatorItemViewsFieldAccessTest.php Tests base field access in Views for the aggregator_item entity.
AggregatorLocalTasksTest class Drupal\Tests\aggregator\Unit\Menu core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php Tests existence of aggregator local tasks.
AggregatorParser class Drupal\aggregator\Annotation core/modules/aggregator/src/Annotation/AggregatorParser.php Defines a Plugin annotation object for aggregator parser plugins.
AggregatorPluginManager class Drupal\aggregator\Plugin core/modules/aggregator/src/Plugin/AggregatorPluginManager.php Manages aggregator plugins. 2 4
AggregatorPluginManagerTest class Drupal\Tests\aggregator\Kernel core/modules/aggregator/tests/src/Kernel/AggregatorPluginManagerTest.php Tests the aggregator plugin manager.
AggregatorPluginSettingsBase abstract class Drupal\aggregator\Plugin core/modules/aggregator/src/Plugin/AggregatorPluginSettingsBase.php Base class for aggregator plugins that implement settings forms. 2 2
AggregatorPluginSettingsBaseTest class Drupal\Tests\aggregator\Unit\Plugin core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php Tests settings configuration of individual aggregator plugins.
AggregatorProcessor class Drupal\aggregator\Annotation core/modules/aggregator/src/Annotation/AggregatorProcessor.php Defines a Plugin annotation object for aggregator processor plugins.
AggregatorRefresh class Drupal\aggregator\Plugin\QueueWorker core/modules/aggregator/src/Plugin/QueueWorker/AggregatorRefresh.php Updates a feed's items.
AggregatorRenderingTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/AggregatorRenderingTest.php Tests display of aggregator items on the page.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.