Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
RouteSubscriber class Drupal\user_route_alter_test\Routing core/modules/serialization/tests/modules/user_route_alter_test/src/Routing/RouteSubscriber.php Alter the 'user.pass.http' route.
RouteSubscriber class Drupal\views\EventSubscriber core/modules/views/src/EventSubscriber/RouteSubscriber.php Builds up the routes of all views. 1 1 2
RouteSubscriber class Drupal\field_ui\Routing core/modules/field_ui/src/Routing/RouteSubscriber.php Subscriber for Field UI routes. 2
RouteSubscriber class Drupal\block_content\Routing core/modules/block_content/src/Routing/RouteSubscriber.php Subscriber for Block content BC routes. 2
RouteSubscriberBase abstract class Drupal\Core\Routing core/lib/Drupal/Core/Routing/RouteSubscriberBase.php Provides a base implementation for RouteSubscriber. 17 17
RouteSubscriberTest class Drupal\Tests\views\Unit\EventSubscriber core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php Tests Drupal\views\EventSubscriber\RouteSubscriber.
RouteTest class Drupal\Tests\migrate\Kernel\process core/modules/migrate/tests/src/Kernel/process/RouteTest.php Tests the route process plugin.
RouteTestSubscriber class Drupal\router_test core/modules/system/tests/modules/router_test_directory/src/RouteTestSubscriber.php Listens to the dynamic route event and add a test route.
RoutingEvents final class Drupal\Core\Routing core/lib/Drupal/Core/Routing/RoutingEvents.php Contains all events thrown in the core routing component. 26
RoutingFixtures class Drupal\Tests\Core\Routing core/tests/Drupal/Tests/Core/Routing/RoutingFixtures.php Utility methods to generate sample data, database configuration, etc. 2
Row class Drupal\migrate core/modules/migrate/src/Row.php Stores a row. 231
RowCountException class Drupal\Core\Database core/lib/Drupal/Core/Database/RowCountException.php Exception thrown if a SELECT query trying to execute rowCount() on result. 4
RowCountExceptionTest class Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php Tests Drupal\Core\Database\RowCountException.
RowEntityRenderersTest class Drupal\Tests\views\Kernel\Entity core/modules/views/tests/src/Kernel/Entity/RowEntityRenderersTest.php Tests the entity row renderers.
RowEntityTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/RowEntityTest.php Tests the generic entity row plugin.
RowPluginBase abstract class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/RowPluginBase.php Base class for Views row plugins. 9 5
RowPluginTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/RowPluginTest.php Tests the node row plugin.
RowRssTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/RowRssTest.php Tests the comment rss row plugin.
RowTest class Drupal\views_test_data\Plugin\views\row core/modules/views/tests/modules/views_test_data/src/Plugin/views/row/RowTest.php Provides a general test row plugin. 1
RowTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/RowTest.php Tests Drupal\migrate\Row.
RowTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/RowTest.php Tests the Row class.
RowUITest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/RowUITest.php Tests the UI of row plugins.
RoyalGala class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityTypeRepositoryTest.php An Apple class for testing.
Rss class Drupal\node\Plugin\views\row core/modules/node/src/Plugin/views/row/Rss.php Performs a node_view on the resulting object and formats it as an RSS item.
Rss class Drupal\comment\Plugin\views\row core/modules/comment/src/Plugin/views/row/Rss.php Plugin which formats the comments as RSS items.
Rss class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/Rss.php Default style plugin to render an RSS feed.
RssDefaultRowViewModeUpdateTest class Drupal\Tests\views\Functional\Update core/modules/views/tests/src/Functional/Update/RssDefaultRowViewModeUpdateTest.php Tests the update view mode when removing system.rss.
RSSEnclosureFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php Plugin implementation of the 'file_rss_enclosure' formatter.
RssFields class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/RssFields.php Renders an RSS item based on fields.
RssFieldsTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/RssFieldsTest.php Tests \Drupal\views\Plugin\views\row\RssFields.
RssPluginBase abstract class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/RssPluginBase.php Base class for Views RSS row plugins. 2 2
RssResponseRelativeUrlFilter class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/RssResponseRelativeUrlFilter.php Subscribes to filter RSS responses, to make relative URIs absolute. 1 2
RssResponseRelativeUrlFilterTest class Drupal\Tests\Core\EventSubscriber core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php Tests Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter.
RssTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/RssTest.php Tests the taxonomy RSS display.
RsyncValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/RsyncValidator.php Checks that rsync is available. 1
RsyncValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/RsyncValidatorTest.php Tests Rsync Validator.
RunnerVersion final class Drupal\TestTools\PhpUnitCompatibility core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php Helper class to determine information about running PHPUnit version. 1
RunTimeRequirementsTest class Drupal\Tests\system\Kernel\System core/modules/system/tests/src/Kernel/System/RunTimeRequirementsTest.php Tests the effectiveness of hook_runtime_requirements().
SafeMarkupTestMarkup class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php Implements MarkupInterface without implementing \Countable.
SameModuleChild class Drupal\Tests\TestTools\ErrorHandler core/tests/Drupal/Tests/TestTools/ErrorHandler/DrupalDebugClassLoaderTest.php Fixture: child in the same module as the parent.
SampleEntityGeneratorInterface interface Drupal\layout_builder\Entity core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php Generates a sample entity. 1 2
SandboxDatabaseUpdatesValidator class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/SandboxDatabaseUpdatesValidator.php Flags a warning if there are database updates in a staged update. 1 3
SandboxDirectoryValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/SandboxDirectoryValidator.php Validates staging root is not a subdirectory of active. 1
SandboxDirectoryValidatorTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/SandboxDirectoryValidatorTest.php Tests Drupal\package_manager\Validator\SandboxDirectoryValidator.
SandboxEvent abstract class Drupal\package_manager\Event core/modules/package_manager/src/Event/SandboxEvent.php Base class for all events related to the life cycle of the stage. 5 8
SandboxEventException class Drupal\package_manager\Exception core/modules/package_manager/src/Exception/SandboxEventException.php Exception thrown if an error related to an event occurs. 12
SandboxException class Drupal\package_manager\Exception core/modules/package_manager/src/Exception/SandboxException.php Base class for all exceptions related to stage operations. 3 6
SandboxManagerBase abstract class Drupal\package_manager core/modules/package_manager/src/SandboxManagerBase.php Creates and manages a stage directory in which to install or update code. 3 18
SandboxManagerBaseTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/SandboxManagerBaseTest.php Tests Drupal\package_manager\SandboxManagerBase.
SandboxManagerBaseTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/SandboxManagerBaseTest.php Tests Drupal\package_manager\SandboxManagerBase.

Other projects


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