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
SystemMenuBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemMenuBlock.php Provides a generic Menu block.
SystemMenuBlockTest class Drupal\Tests\system\Kernel\Block core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php Tests \Drupal\system\Plugin\Block\SystemMenuBlock.
SystemMenuOffCanvasForm class Drupal\system\Form core/modules/system/src/Form/SystemMenuOffCanvasForm.php The setting_tray form handler for the SystemMenuBlock.
SystemMessagesBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemMessagesBlock.php Provides a block to display the messages.
SystemPoweredByBlock class Drupal\system\Plugin\Block core/modules/system/src/Plugin/Block/SystemPoweredByBlock.php Provides a 'Powered by Drupal' block.
SystemTestController class Drupal\system_test\Controller core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php Controller routines for system_test routes.
SystemUpdate7000 class Drupal\system\Plugin\migrate\process\d6 core/modules/system/src/Plugin/migrate/process/d6/SystemUpdate7000.php Rename blog and forum permissions to be consistent with other content types.
TabbableShimDialogIntegrationTestController class Drupal\tabbable_shim_test\Controller core/modules/system/tests/modules/tabbable_shim_test/src/Controller/TabbableShimDialogIntegrationTestController.php For testing the jQuery :tabbable shim as used in a dialog.
TabbableShimTestController class Drupal\tabbable_shim_test\Controller core/modules/system/tests/modules/tabbable_shim_test/src/Controller/TabbableShimTestController.php For testing the jQuery :tabbable shim.
TabbingManagerTestController class Drupal\tabbingmanager_test\Controller core/modules/system/tests/modules/tabbingmanager_test/src/Controller/TabbingManagerTestController.php For testing the Tabbing Manager.
Table class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Table.php Provides a render element for a table. 2 1
Table class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/Table.php Style plugin to render each item as a row in a table. 1
TableDragTest class Drupal\FunctionalJavascriptTests\TableDrag core/tests/Drupal/FunctionalJavascriptTests/TableDrag/TableDragTest.php Tests draggable table. 1 1
TableDragTestForm class Drupal\tabledrag_test\Form core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php Provides a form for draggable table testing. 1 1
TableFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/TableFormatter.php Plugin implementation of the 'file_table' formatter.
TableMappingInterface interface Drupal\Core\Entity\Sql core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php Provides a common interface for mapping field columns to SQL tables. 1 3
Tables class Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/Tables.php Adds tables and fields to the SQL entity query. 1 1
Tables class Drupal\workspaces\EntityQuery core/modules/workspaces/src/EntityQuery/Tables.php Alters entity queries to use a workspace revision instead of the default one.
Tableselect class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Tableselect.php Provides a form element for a table with radios or checkboxes in left column. 1
TableSelectTest class Drupal\Tests\Core\Render\Element core/tests/Drupal/Tests/Core/Render/Element/TableSelectTest.php @coversDefaultClass \Drupal\Core\Render\Element\Tableselect[[api-linebreak]] @group Render
TablesInterface interface Drupal\Core\Entity\Query\Sql core/lib/Drupal/Core/Entity/Query/Sql/TablesInterface.php Adds tables and fields to the SQL entity query. 1
TableSort class Drupal\Core\Utility core/lib/Drupal/Core/Utility/TableSort.php Provides a class for table sorting processing and rendering. 5
TableSortExtender class Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/TableSortExtender.php CorefakeWithAllCustomClasses implementation of \Drupal\Core\Database\Query\TableSortExtender.
TableSortExtender class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/TableSortExtender.php Query extender class for tablesort queries. 1 5
TableSortExtenderTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/TableSortExtenderTest.php Tests table sorting.
TableTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/TableTest.php Tests built-in table theme functions.
TableTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php For testing the table plugin.
Tag class Drupal\views\Plugin\views\cache core/modules/views/src/Plugin/views/cache/Tag.php Simple caching of query results for Views displays.
TaggedHandlersPass class Drupal\Core\DependencyInjection\Compiler core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php Collects services to add/inject them into a consumer service. 2
TaggedHandlersPassTest class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php @coversDefaultClass \Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass[[api-linebreak]] @group DependencyInjection
TaggedWithTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php Tests the ability of the views wizard to create views filtered by taxonomy.
TaggingTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/TaggingTest.php Tests the tagging capabilities of the Select builder.
Tags class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Tags.php Defines a class that can explode and implode tags. 11
TagsTest class Drupal\Tests\Core\Common core/tests/Drupal/Tests/Core/Common/TagsTest.php Tests explosion and implosion of autocomplete tags.
TagTest class Drupal\Tests\views_ui\Kernel core/modules/views_ui/tests/src/Kernel/TagTest.php Tests the views ui tagging functionality.
Tar class Drupal\system\Plugin\Archiver core/modules/system/src/Plugin/Archiver/Tar.php Defines an archiver implementation for .tar files.
Tar class Drupal\Core\Archiver core/lib/Drupal/Core/Archiver/Tar.php Defines an archiver implementation for .tar files. 1 2
TargetBundle class Drupal\taxonomy\Plugin\migrate\process core/modules/taxonomy/src/Plugin/migrate/process/TargetBundle.php Converts a Drupal 6 vocabulary ID to a target bundle array.
TargetIdResolver class Drupal\serialization\EntityResolver core/modules/serialization/src/EntityResolver/TargetIdResolver.php Resolves entities from data that contains an entity target ID. 2
Tasks class Drupal\mysql\Driver\Database\mysql\Install core/modules/mysql/src/Driver/Database/mysql/Install/Tasks.php Specifies installation tasks for MySQL and equivalent databases. 4 6
Tasks class Drupal\sqlite\Driver\Database\sqlite\Install core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php Specifies installation tasks for SQLite databases. 2 5
Tasks class Drupal\pgsql\Driver\Database\pgsql\Install core/modules/pgsql/src/Driver/Database/pgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases. 3 3
Tasks class Drupal\database_statement_monitoring_test\sqlite\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Install/Tasks.php
Tasks class Drupal\database_statement_monitoring_test\mysql\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Install/Tasks.php
Tasks class Drupal\database_statement_monitoring_test\pgsql\Install core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Install/Tasks.php
Tasks class Drupal\driver_test\Driver\Database\DrivertestMysql\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Install/Tasks.php Specifies installation tasks for MySQL test databases. 1
Tasks class Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Install/Tasks.php Specifies installation tasks for MySQL test databases.
Tasks class Drupal\driver_test\Driver\Database\DrivertestPgsql\Install core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Install/Tasks.php Specifies installation tasks for PostgreSQL databases.
Tasks

in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module.

class Drupal\Core\Database\Driver\sqlite\Install core/lib/Drupal/Core/Database/Driver/sqlite/Install/Tasks.php Specifies installation tasks for SQLite databases. 1
Tasks

in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module.

class Drupal\Core\Database\Driver\mysql\Install core/lib/Drupal/Core/Database/Driver/mysql/Install/Tasks.php Specifies installation tasks for MySQL and equivalent databases. 1

Other projects


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