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
LinkNotExistingInternalConstraintValidator class Drupal\link\Plugin\Validation\Constraint core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php Validates the LinkNotExistingInternal constraint. 1
LinkNotExistingInternalConstraintValidatorTest class Drupal\Tests\link\Unit\Plugin\Validation\Constraint core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php @coversDefaultClass \Drupal\link\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidator @group Link
LinkRelationsTest class Drupal\KernelTests\Core\Http core/tests/Drupal/KernelTests/Core/Http/LinkRelationsTest.php Tests link relationships in Drupal.
LinkRelationType class Drupal\Core\Http core/lib/Drupal/Core/Http/LinkRelationType.php Defines a single link relationship type. 1
LinkRelationTypeInterface interface Drupal\Core\Http core/lib/Drupal/Core/Http/LinkRelationTypeInterface.php Defines a single link relation type. 1
LinkRelationTypeManager class Drupal\Core\Http core/lib/Drupal/Core/Http/LinkRelationTypeManager.php Provides a default plugin manager for link relation types. 2
LinkReply class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/LinkReply.php Field handler to present a link to reply to a comment.
Links abstract class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Links.php A abstract handler which provides a collection of links. 1
LinkSeparateFormatter class Drupal\link\Plugin\Field\FieldFormatter core/modules/link/src/Plugin/Field/FieldFormatter/LinkSeparateFormatter.php Plugin implementation of the 'link_separate' formatter.
LinkTest class Drupal\Tests\jsonapi\Unit\JsonApiResource core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php @coversDefaultClass \Drupal\jsonapi\JsonApiResource\Link @group jsonapi
LinkTypeConstraint class Drupal\link\Plugin\Validation\Constraint core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php Validation constraint for links receiving data allowed by its settings.
LinkTypeConstraintValidator class Drupal\link\Plugin\Validation\Constraint core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraintValidator.php Constraint validator for links receiving data allowed by its settings.
LinkUri class Drupal\menu_link_content\Plugin\migrate\process core/modules/menu_link_content/src/Plugin/migrate/process/LinkUri.php Generates an internal URI from the source value. 2 3
LinkUri

in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\menu_link_content\Plugin\migrate\process\LinkUri instead.

class Drupal\menu_link_content\Plugin\migrate\process\d6 core/modules/menu_link_content/src/Plugin/migrate/process/d6/LinkUri.php Processes a link path into an 'internal:' or 'entity:' URI.
LinkUriTest class Drupal\Tests\menu_link_content\Kernel\Plugin\migrate\process core/modules/menu_link_content/tests/src/Kernel/Plugin/migrate/process/LinkUriTest.php Tests \Drupal\menu_link_content\Plugin\migrate\process\LinkUri.
LinkViewsTokensTest class Drupal\Tests\link\Functional\Views core/modules/link/tests/src/Functional/Views/LinkViewsTokensTest.php Tests the views integration for link tokens.
LinkWidget class Drupal\link\Plugin\Field\FieldWidget core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php Plugin implementation of the 'link' widget.
ListCacheBinsPass class Drupal\Core\Cache core/lib/Drupal/Core/Cache/ListCacheBinsPass.php Adds cache_bins parameter to the container. 1
ListDataDefinition class Drupal\Core\TypedData core/lib/Drupal/Core/TypedData/ListDataDefinition.php A typed data definition class for defining lists. 3 5
ListDataDefinitionInterface interface Drupal\Core\TypedData core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php Interface for data definitions of lists. 2 3
ListElement class Drupal\config_translation\FormElement core/modules/config_translation/src/FormElement/ListElement.php Defines the list element for the configuration translation interface.
ListField class Drupal\options\Plugin\views\filter core/modules/options/src/Plugin/views/filter/ListField.php Filter handler which uses list-fields as options.
ListField class Drupal\options\Plugin\migrate\field\d7 core/modules/options/src/Plugin/migrate/field/d7/ListField.php Plugin annotation @MigrateField( id = "list", type_map = { "list_boolean" = "boolean", "list_integer" = "list_integer", "list_text" = "list_string", "list_float" = "list_float", }, core = {7}, source_module = "list", …
ListFloatItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php Plugin implementation of the 'list_float' field type.
ListingEmpty class Drupal\node\Plugin\views\area core/modules/node/src/Plugin/views/area/ListingEmpty.php Defines an area plugin to display a node/add link.
ListingEmpty class Drupal\block_content\Plugin\views\area core/modules/block_content/src/Plugin/views/area/ListingEmpty.php Defines an area plugin to display a block add link.
ListIntegerItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListIntegerItem.php Plugin implementation of the 'list_integer' field type. 1
ListInterface interface Drupal\Core\TypedData core/lib/Drupal/Core/TypedData/ListInterface.php Interface for a list of typed data. 2 7
ListItemBase abstract class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php Plugin base class inherited by the options field types. 3
ListNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/ListNormalizer.php Converts list objects to arrays. 1 1 2
ListNormalizerTest class Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/ListNormalizerTest.php @coversDefaultClass \Drupal\serialization\Normalizer\ListNormalizer @group serialization
ListStringItem class Drupal\options\Plugin\Field\FieldType core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php Plugin implementation of the 'list_string' field type.
Llama class Drupal\ckeditor_test\Plugin\CKEditorPlugin core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/Llama.php Defines the "Llama" plugin, with a CKEditor "llama" feature. 4
LlamaButton class Drupal\ckeditor_test\Plugin\CKEditorPlugin core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaButton.php Defines a "LlamaButton" plugin, with a toolbar builder-enabled "llama" feature.
LlamaContextual class Drupal\ckeditor_test\Plugin\CKEditorPlugin core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaContextual.php Defines a "Llama" plugin, with a contextually enabled "llama" feature.
LlamaContextualAndButton class Drupal\ckeditor_test\Plugin\CKEditorPlugin core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaContextualAndButton.php Defines a "LlamaContextualAndButton" plugin, with a contextually OR toolbar builder-enabled "llama" feature.
LlamaCss class Drupal\ckeditor_test\Plugin\CKEditorPlugin core/modules/ckeditor/tests/modules/src/Plugin/CKEditorPlugin/LlamaCss.php Defines a "LlamaCss" plugin, with an associated "llama" CSS.
LoadMultipleTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/LoadMultipleTest.php Tests the loading of multiple taxonomy terms at once.
LoadTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/LoadTest.php Tests \Drupal\file\Entity\File::load().
Local class Drupal\Core\FileTransfer core/lib/Drupal/Core/FileTransfer/Local.php Defines the local connection class for copying files as the httpd user. 1 3
LocalActionDefault class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionDefault.php Provides a default implementation for local action plugins. 6 7 2
LocalActionDefaultTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalActionDefaultTest.php @coversDefaultClass \Drupal\Core\Menu\LocalActionDefault @group Menu
LocalActionInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionInterface.php Defines an interface for menu local actions. 1
LocalActionManager class Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionManager.php Provides the default local action manager using YML as primary definition. 1 1 2
LocalActionManagerInterface interface Drupal\Core\Menu core/lib/Drupal/Core/Menu/LocalActionManagerInterface.php Manages discovery and instantiation of menu local action plugins. 1 2
LocalActionManagerTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php @coversDefaultClass \Drupal\Core\Menu\LocalActionManager @group Menu
LocalActionManagerTest class Drupal\KernelTests\Core\Menu core/tests/Drupal/KernelTests/Core/Menu/LocalActionManagerTest.php Tests the local action manager.
LocalActionsAndTasksConvertedIntoBlocksUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/LocalActionsAndTasksConvertedIntoBlocksUpdateTest.php Tests the upgrade path for local actions/tasks being converted into blocks.
LocalActionsBlock class Drupal\Core\Menu\Plugin\Block core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php Provides a block to display the local actions.
LocalActionTest class Drupal\Tests\system\Functional\Menu core/modules/system/tests/src/Functional/Menu/LocalActionTest.php Tests local actions derived from router and added/altered via hooks.

Other projects


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