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
MediaSourceImageTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php Tests the image media source.
MediaSourceInterface interface Drupal\media core/modules/media/src/MediaSourceInterface.php Defines the interface for media source plugins. 3 1
MediaSourceManager class Drupal\media core/modules/media/src/MediaSourceManager.php Manages media source plugins. 2
MediaSourceOEmbedVideoTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php Tests the oembed:video media source.
MediaSourceTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaSourceTest.php Tests media source plugins related logic.
MediaSourceTestBase abstract class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php Base class for media source tests. 4
MediaStandardProfileTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php Basic tests for Media configuration in the standard profile.
MediaStorage class Drupal\media core/modules/media/src/MediaStorage.php Defines the storage handler class for media.
MediaTemplateSuggestionsTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaTemplateSuggestionsTest.php Tests media template suggestions.
MediaTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaTest.php Tests Media.
MediaTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/MediaTest.php JSON:API integration test for the "Media" content entity type.
MediaTestConstraint class Drupal\media_test_source\Plugin\Validation\Constraint core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php A media test constraint.
MediaTestConstraintValidator class Drupal\media_test_source\Plugin\Validation\Constraint core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraintValidator.php Validates the MediaTestConstraint.
MediaTestOembedServiceProvider class Drupal\media_test_oembed core/modules/media/tests/modules/media_test_oembed/src/MediaTestOembedServiceProvider.php Replaces oEmbed-related media services with testing versions.
MediaThumbnailFormatter class Drupal\media\Plugin\Field\FieldFormatter core/modules/media/src/Plugin/Field/FieldFormatter/MediaThumbnailFormatter.php Plugin implementation of the 'media_thumbnail' formatter.
MediaTranslationTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaTranslationTest.php Tests multilanguage fields logic.
MediaTranslationUITest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaTranslationUITest.php Tests the Media Translation UI.
MediaType class Drupal\media\Entity core/modules/media/src/Entity/MediaType.php Defines the Media type configuration entity. 21
MediaTypeAccessControlHandler class Drupal\media core/modules/media/src/MediaTypeAccessControlHandler.php Defines the access control handler for the "Media Type" entity type.
MediaTypeCreationTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php Tests the media type creation.
MediaTypeCreationTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaTypeCreationTest.php Ensures that media UI works correctly without JavaScript.
MediaTypeCreationTrait trait Drupal\Tests\media\Traits core/modules/media/tests/src/Traits/MediaTypeCreationTrait.php Provides methods to create a media type from given values. 20
MediaTypeDeleteConfirmForm class Drupal\media\Form core/modules/media/src/Form/MediaTypeDeleteConfirmForm.php Provides a form for media type deletion.
MediaTypeForm class Drupal\media core/modules/media/src/MediaTypeForm.php Form controller for media type forms. 1
MediaTypeHalJsonAnonTest class Drupal\Tests\media\Functional\Hal core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonAnonTest.php @group hal
MediaTypeHalJsonBasicAuthTest class Drupal\Tests\media\Functional\Hal core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonBasicAuthTest.php @group hal
MediaTypeHalJsonCookieTest class Drupal\Tests\media\Functional\Hal core/modules/media/tests/src/Functional/Hal/MediaTypeHalJsonCookieTest.php @group hal
MediaTypeInterface interface Drupal\media core/modules/media/src/MediaTypeInterface.php Provides an interface defining a media type entity. 1 14
MediaTypeJsonAnonTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeJsonAnonTest.php @group rest
MediaTypeJsonBasicAuthTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeJsonBasicAuthTest.php @group rest
MediaTypeJsonCookieTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeJsonCookieTest.php @group rest
MediaTypeListBuilder class Drupal\media core/modules/media/src/MediaTypeListBuilder.php Provides a listing of media types.
MediaTypeResourceTestBase abstract class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeResourceTestBase.php 10 4
MediaTypeResourceTestBase

in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\media\Functional\Rest\MediaTypeResourceTestBase instead.

abstract class Drupal\Tests\rest\Functional\EntityResource\MediaType core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeResourceTestBase.php
MediaTypeTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/MediaTypeTest.php JSON:API integration test for the "MediaType" config entity type.
MediaTypeXmlAnonTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeXmlAnonTest.php @group rest
MediaTypeXmlBasicAuthTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeXmlBasicAuthTest.php @group rest
MediaTypeXmlCookieTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaTypeXmlCookieTest.php @group rest
MediaUiFunctionalTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php Ensures that media UI works correctly.
MediaUiJavascriptTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php Ensures that media UI works correctly.
MediaUpdateTest class Drupal\Tests\media\Functional\Update core/modules/media/tests/src/Functional/Update/MediaUpdateTest.php Tests that media settings are properly updated during database updates.
MediaViewsData class Drupal\media core/modules/media/src/MediaViewsData.php Provides the Views data for the media entity type.
MediaViewsWizardTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php Tests the media entity type integration into the wizard.
MediaXmlAnonTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaXmlAnonTest.php @group rest
MediaXmlBasicAuthTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaXmlBasicAuthTest.php @group rest
MediaXmlCookieTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaXmlCookieTest.php @group rest
Memory class Drupal\Core\Queue core/lib/Drupal/Core/Queue/Memory.php Static queue implementation. 1 1
MemoryBackend class Drupal\Core\Flood core/lib/Drupal/Core/Flood/MemoryBackend.php Defines the memory flood backend. This is used for testing. 1
MemoryBackend class Drupal\Core\Cache core/lib/Drupal/Core/Cache/MemoryBackend.php Defines a memory cache implementation. 3 12
MemoryBackendFactory class Drupal\Core\Cache core/lib/Drupal/Core/Cache/MemoryBackendFactory.php 2

Other projects


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