Classes, traits, and interfaces - 11.x - drupal
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 1531
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| BlockRegion | class | Drupal\block\Plugin\migrate\process | core/ |
Determines the region for a block. | 1 | |||
| BlockRegionTest | class | Drupal\Tests\block\Unit\Plugin\migrate\process | core/ |
Tests Drupal\block\Plugin\migrate\process\BlockRegion. | ||||
| BlockRenderAlterContent | class | Drupal\block_test | core/ |
Implements a trusted preRender callback. | ||||
| BlockRenderOrderTest | class | Drupal\Tests\block\Functional | core/ |
Tests blocks are being rendered in order by weight. | ||||
| BlockRepository | class | Drupal\block | core/ |
Provides a repository for Block config entities. | 2 | 2 | ||
| BlockRepositoryInterface | interface | Drupal\block | core/ |
Provides an interface for the block repository. | 1 | 1 | ||
| BlockRepositoryTest | class | Drupal\Tests\block\Unit | core/ |
Tests Drupal\block\BlockRepository. | ||||
| BlockResourceTestBase | abstract class | Drupal\Tests\block\Functional\Rest | core/ |
Resource test base for the block entity. | 6 | |||
| BlockSettings | class | Drupal\block\Plugin\migrate\process | core/ |
Determines the block settings. | 1 | |||
| BlockSettingsTest | class | Drupal\Tests\block\Unit\Plugin\migrate\process | core/ |
Tests Drupal\block\Plugin\migrate\process\BlockSettings. | ||||
| BlockStorageUnitTest | class | Drupal\Tests\block\Kernel | core/ |
Tests the storage of blocks. | ||||
| BlockSystemBrandingTest | class | Drupal\Tests\block\Functional | core/ |
Tests branding block display. | ||||
| BlockTemplateSuggestionsTest | class | Drupal\Tests\block\Kernel | core/ |
Tests the block theme suggestions. | ||||
| BlockTemplateSuggestionsTest | class | Drupal\Tests\block_content\Kernel | core/ |
Tests the block_content_theme_suggestions_block() function. | ||||
| BlockTest | class | Drupal\Tests\views\Unit\Plugin\views\display | core/ |
Tests Drupal\views\Plugin\views\display\Block. | ||||
| BlockTest | class | Drupal\Tests\block\Kernel\Plugin\migrate\source | core/ |
Tests block source plugin. | 1 | 1 | ||
| BlockTest | class | Drupal\Tests\block\Functional | core/ |
Tests basic block functionality. | ||||
| BlockTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "Block" config entity type. | ||||
| BlockTestBase | abstract class | Drupal\Tests\block\Functional | core/ |
Provides setup and helper methods for block module tests. | 2 | |||
| BlockTestHooks | class | Drupal\block_test\Hook | core/ |
Hook implementations for block_test. | ||||
| BlockTheme | class | Drupal\block\Plugin\migrate\process | core/ |
Determines the theme to use for a block. | ||||
| BlockThemeHooks | class | Drupal\block\Hook | core/ |
Hook implementations for block. | ||||
| BlockTranslation | class | Drupal\block\Plugin\migrate\source\d6 | core/ |
Drupal 6 i18n block data from database. | 1 | |||
| BlockTranslation | class | Drupal\block\Plugin\migrate\source\d7 | core/ |
Drupal 7 i18n block data from database. | 1 | |||
| BlockTranslationTest | class | Drupal\Tests\block\Kernel\Plugin\migrate\source\d6 | core/ |
Tests i18n block source plugin. | ||||
| BlockTranslationTest | class | Drupal\Tests\block\Kernel\Plugin\migrate\source\d7 | core/ |
Tests i18n block source plugin. | ||||
| BlockTypeAccessControlHandler | class | Drupal\block_content | core/ |
Defines the access control handler for the "Block Type" entity type. | 1 | |||
| BlockUiTest | class | Drupal\Tests\block\Functional | core/ |
Tests that the block configuration UI exists and stores data correctly. | ||||
| BlockUser | class | Drupal\user\Plugin\Action | core/ |
Blocks a user. | ||||
| BlockValidationTest | class | Drupal\Tests\block\Kernel | core/ |
Tests validation of block entities. | ||||
| BlockViewBuilder | class | Drupal\block | core/ |
Provides a Block view builder. | 1 | |||
| BlockViewBuilderTest | class | Drupal\Tests\block\Kernel | core/ |
Tests the block view builder. | ||||
| BlockVisibility | class | Drupal\block\Plugin\migrate\process | core/ |
Determines the visibility for a block. | 1 | |||
| BlockVisibilityTest | class | Drupal\Tests\block\Unit\Plugin\migrate\process | core/ |
Tests the block_visibility process plugin. | ||||
| BlockWeightUpdateTest | class | Drupal\Tests\block\Functional | core/ |
Tests Block Weight Update. | ||||
| BlockXmlAnonTest | class | Drupal\Tests\block\Functional\Rest | core/ |
Tests Block Xml Anon. | ||||
| BlockXmlBasicAuthTest | class | Drupal\Tests\block\Functional\Rest | core/ |
Tests Block Xml Basic Auth. | ||||
| BlockXmlCookieTest | class | Drupal\Tests\block\Functional\Rest | core/ |
Tests Block Xml Cookie. | ||||
| BlockXssTest | class | Drupal\Tests\block\Functional | core/ |
Tests that the block module properly escapes block descriptions. | ||||
| BodyFieldCreationTrait | trait | Drupal\Tests\field\Traits | core/ |
Provides a method to create a body field for a given bundle. | 3 | |||
| Boolean | class | Drupal\views\Plugin\views\field | core/ |
A handler to provide proper displays for booleans. | ||||
| BooleanCheckboxWidget | class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'boolean_checkbox' widget. | ||||
| BooleanData | class | Drupal\Core\TypedData\Plugin\DataType | core/ |
The boolean data type. | 4 | 1 | ||
| BooleanFieldTest | class | Drupal\Tests\field\Functional\Boolean | core/ |
Tests boolean field functionality. | ||||
| BooleanFormatter | class | Drupal\Core\Field\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'boolean' formatter. | ||||
| BooleanFormatterSettingsTest | class | Drupal\Tests\field\Functional\Boolean | core/ |
Tests the Boolean field formatter settings. | ||||
| BooleanFormatterSettingsTest | class | Drupal\Tests\field\FunctionalJavascript\Boolean | core/ |
Tests the Boolean field formatter settings. | ||||
| BooleanFormatterTest | class | Drupal\Tests\field\Kernel\Boolean | core/ |
Tests the boolean formatter. | ||||
| BooleanInterface | interface | Drupal\Core\TypedData\Type | core/ |
Interface for boolean data. | 1 | 4 | ||
| BooleanItem | class | Drupal\Core\Field\Plugin\Field\FieldType | core/ |
Defines the 'boolean' entity field type. | 1 | 6 |
Pagination
- Previous page
- Page 16
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.