Classes, traits, and interfaces - 9.5.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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
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. 228
RowCountException class Drupal\Core\Database core/lib/Drupal/Core/Database/RowCountException.php Exception thrown if a SELECT query trying to execute rowCount() on result. 3
RowCountExceptionTest class Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php @coversDefaultClass \Drupal\Core\Database\RowCountException[[api-linebreak]]
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\Functional\Views core/modules/node/tests/src/Functional/Views/RowPluginTest.php Tests the node row plugin.
RowRenderCacheTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/RowRenderCacheTest.php Tests row render caching.
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\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/RowTest.php @coversDefaultClass \Drupal\migrate\Row[[api-linebreak]] @group migrate
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
RowUITest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/RowUITest.php Tests the UI of row plugins.
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\aggregator\Plugin\views\row core/modules/aggregator/src/Plugin/views/row/Rss.php Defines a row plugin which loads an aggregator item and renders as RSS.
Rss class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/Rss.php Default style plugin to render an RSS feed.
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.
RSSEnclosureFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php Plugin implementation of the 'file_rss_enclosure' formatter.
RssFeedsForm class Drupal\system\Form core/modules/system/src/Form/RssFeedsForm.php Configure RSS settings for this site. 1
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. 3 3
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 @coversDefaultClass \Drupal\Core\EventSubscriber\RssResponseRelativeUrlFilter[[api-linebreak]] @group event_subscriber
RssTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/RssTest.php Tests the taxonomy RSS display.
RssViewIntegrationTest class Drupal\Tests\rdf\Functional core/modules/rdf/tests/src/Functional/RssViewIntegrationTest.php @group rdf @group legacy
RunnerVersion final class Drupal\TestTools\PhpUnitCompatibility core/tests/Drupal/TestTools/PhpUnitCompatibility/RunnerVersion.php Helper class to determine information about running PHPUnit version. 4
SafeMarkupTestMarkup class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php Implements MarkupInterface without implementing \Countable.
SampleEntityGeneratorInterface interface Drupal\layout_builder\Entity core/modules/layout_builder/src/Entity/SampleEntityGeneratorInterface.php Generates a sample entity. 1 2
SaveAction class Drupal\Core\Action\Plugin\Action core/lib/Drupal/Core/Action/Plugin/Action/SaveAction.php Provides an action that can save any entity.
SaveActionTest class Drupal\KernelTests\Core\Action core/tests/Drupal/KernelTests/Core/Action/SaveActionTest.php @group Action
SaveEntity class Drupal\action_test\Plugin\Action core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php Provides an operation to save user entities.
SaveTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/SaveTest.php File saving tests.
SaveUploadFormTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/SaveUploadFormTest.php Tests the _file_save_upload_from_form() function.
SaveUploadTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/SaveUploadTest.php Tests the file_save_upload() function. 1
ScaffoldFileCollection class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php Collection of scaffold files. 2
ScaffoldFileCollectionTest class Drupal\Tests\Composer\Plugin\Scaffold\Integration core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ScaffoldFileCollectionTest.php @coversDefaultClass \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection[[api-linebreak]]
ScaffoldFileInfo class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldFileInfo.php Data object that keeps track of one scaffold file. 1
ScaffoldFilePath class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldFilePath.php Manage the path to a file to scaffold. 9
ScaffoldOptions class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/ScaffoldOptions.php Per-project options from the 'extras' section of the composer.json file. 8
ScaffoldResult class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/ScaffoldResult.php Record the result of a scaffold operation. 1
ScaffoldTest class Drupal\Tests\Composer\Plugin\Scaffold\Functional core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldTest.php Tests Composer Scaffold.
ScaffoldTestResult class Drupal\Tests\Composer\Plugin\Scaffold core/tests/Drupal/Tests/Composer/Plugin/Scaffold/ScaffoldTestResult.php Holds result of a scaffold test. 1
ScaffoldUpgradeTest class Drupal\Tests\Composer\Plugin\Scaffold\Functional core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ScaffoldUpgradeTest.php Tests Upgrading the Composer Scaffold plugin.
Scale class Drupal\system\Plugin\ImageToolkit\Operation\gd core/modules/system/src/Plugin/ImageToolkit/Operation/gd/Scale.php Defines GD2 Scale operation.
ScaleAndCrop class Drupal\system\Plugin\ImageToolkit\Operation\gd core/modules/system/src/Plugin/ImageToolkit/Operation/gd/ScaleAndCrop.php Defines GD2 Scale and crop operation.
ScaleAndCropImageEffect class Drupal\image\Plugin\ImageEffect core/modules/image/src/Plugin/ImageEffect/ScaleAndCropImageEffect.php Scales and crops an image resource.
ScaleImageEffect class Drupal\image\Plugin\ImageEffect core/modules/image/src/Plugin/ImageEffect/ScaleImageEffect.php Scales an image resource.
ScanDirectoryTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/ScanDirectoryTest.php Tests \Drupal\Core\File\FileSystem::scanDirectory. 1
Schema class Drupal\Tests\Core\Database\Stub\Driver core/tests/Drupal/Tests/Core/Database/Stub/Driver/Schema.php A very minimal class for testing purposes.

Other projects


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