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
MediaJsonAnonTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaJsonAnonTest.php @group rest
MediaJsonBasicAuthTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaJsonBasicAuthTest.php @group rest
MediaJsonCookieTest class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaJsonCookieTest.php @group rest
MediaKernelTestBase abstract class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaKernelTestBase.php Base class for Media kernel tests. 9
MediaLibraryAccessTest class Drupal\Tests\media_library\Kernel core/modules/media_library/tests/src/Kernel/MediaLibraryAccessTest.php Tests the media library access.
MediaLibraryAddFormTest class Drupal\Tests\media_library\Kernel core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php Tests the media library add form.
MediaLibraryDisplayModeTest class Drupal\Tests\media_library\Functional core/modules/media_library/tests/src/Functional/MediaLibraryDisplayModeTest.php Tests that the Media Library automatically configures form/view modes.
MediaLibraryEditorOpener class Drupal\media_library core/modules/media_library/src/MediaLibraryEditorOpener.php The media library opener for text editors. 2
MediaLibraryFieldWidgetOpener class Drupal\media_library core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php The media library opener for field widgets. 2
MediaLibraryInceptionWidget class Drupal\media_library_test_widget\Plugin\Field\FieldWidget core/modules/media_library/tests/modules/media_library_test_widget/src/Plugin/Field/FieldWidget/MediaLibraryInceptionWidget.php Plugin implementation of the 'media_library_inception_widget' widget.
MediaLibraryOpenerInterface interface Drupal\media_library core/modules/media_library/src/MediaLibraryOpenerInterface.php Defines an interface for media library openers. 2
MediaLibrarySelectForm class Drupal\media_library\Plugin\views\field core/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php Defines a field that outputs a checkbox and form for selecting media.
MediaLibrarySetAdministrativePageToTableDisplayTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibrarySetAdministrativePageToTableDisplayTest.php Tests update to set 'media' view's table display as the administrative page.
MediaLibraryState class Drupal\media_library core/modules/media_library/src/MediaLibraryState.php A value object for the media library state. 8
MediaLibraryStateTest class Drupal\Tests\media_library\Kernel core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php Tests the media library state value object.
MediaLibraryTestBase abstract class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php Base class for functional tests of Media Library functionality. 10
MediaLibraryUiBuilder class Drupal\media_library core/modules/media_library/src/MediaLibraryUiBuilder.php Service which builds the media library. 5 2
MediaLibraryUpdate8704Test class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdate8704Test.php Tests update path to create the media_library.settings config object.
MediaLibraryUpdateCheckboxClassesTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateCheckboxClassesTest.php Tests the media library module updates views checkbox classes.
MediaLibraryUpdateFormAndViewDisplaysTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateFormAndViewDisplaysTest.php Tests the media library module updates for form and view displays.
MediaLibraryUpdateViewLangcodeFiltersTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateViewLangcodeFiltersTest.php Tests the media library module updates for the langcode filters.
MediaLibraryUpdateViewPageDisplayEditDeleteLinkTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateViewPageDisplayEditDeleteLinkTest.php Tests the media library module updates for the view page display links.
MediaLibraryUpdateViewStatusExtraFilterTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateViewStatusExtraFilterTest.php Tests the media library module updates for the view page display links.
MediaLibraryUpdateViewTableDisplayTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateViewTableDisplayTest.php Tests the media library module updates for the view table display.
MediaLibraryUpdateWidgetViewTest class Drupal\Tests\media_library\Functional\Update core/modules/media_library/tests/src/Functional/Update/MediaLibraryUpdateWidgetViewTest.php Tests the media library module updates for the widget view.
MediaLibraryWidget class Drupal\media_library\Plugin\Field\FieldWidget core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php Plugin implementation of the 'media_library_widget' widget. 1 1
MediaLibraryWidgetTest class Drupal\Tests\media_library\Kernel core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php Tests the media library widget.
MediaLinkRelationsTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaLinkRelationsTest.php Tests link relationships for media items.
MediaListBuilder class Drupal\media core/modules/media/src/MediaListBuilder.php Provides a listing of media items.
MediaOverviewPageTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaOverviewPageTest.php Tests the Media overview page.
MediaOverviewTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php Tests the grid-style media overview page.
MediaPermissions class Drupal\media core/modules/media/src/MediaPermissions.php Provides dynamic permissions for each media type.
MediaReferenceFieldHelpTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php Tests related to media reference fields.
MediaResourceTestBase abstract class Drupal\Tests\media\Functional\Rest core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php 8 2
MediaResourceTestBase

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

abstract class Drupal\Tests\rest\Functional\EntityResource\Media core/modules/rest/tests/src/Functional/EntityResource/Media/MediaResourceTestBase.php
MediaRevision class Drupal\media\Plugin\views\wizard core/modules/media/src/Plugin/views/wizard/MediaRevision.php Provides Views creation wizard for Media revisions.
MediaRevisionAccessCheck class Drupal\media\Access core/modules/media/src/Access/MediaRevisionAccessCheck.php Provides an access checker for media item revisions. 1 2
MediaRevisionTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaRevisionTest.php Tests the revisionability of media entities.
MediaRouteProvider class Drupal\media\Routing core/modules/media/src/Routing/MediaRouteProvider.php Provides HTML routes for media pages.
MediaSelection class Drupal\media\Plugin\EntityReferenceSelection core/modules/media/src/Plugin/EntityReferenceSelection/MediaSelection.php Provides specific access control for the media entity type.
MediaSettingsForm class Drupal\media\Form core/modules/media/src/Form/MediaSettingsForm.php Provides a form to configure Media settings. 1
MediaSettingsTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaSettingsTest.php Testing the media settings.
MediaSource class Drupal\media\Annotation core/modules/media/src/Annotation/MediaSource.php Defines a media source plugin annotation object. 1
MediaSourceAudioVideoTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php Tests the Audio and Video media sources.
MediaSourceBase abstract class Drupal\media core/modules/media/src/MediaSourceBase.php Base implementation of media source plugin. 3 3
MediaSourceEntityConstraintsInterface interface Drupal\media core/modules/media/src/MediaSourceEntityConstraintsInterface.php Defines an interface for a media source with entity constraints. 1 2
MediaSourceFieldConstraintsInterface interface Drupal\media core/modules/media/src/MediaSourceFieldConstraintsInterface.php Defines an interface for a media source with source field constraints. 2 3
MediaSourceFileTest class Drupal\Tests\media\FunctionalJavascript core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php Tests the file media source.
MediaSourceFileTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/MediaSourceFileTest.php Tests the file media source.
MediaSourceFileTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/MediaSourceFileTest.php Tests the file media source.

Other projects


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