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
ShortcutSetAccessControlHandler class Drupal\shortcut core/modules/shortcut/src/ShortcutSetAccessControlHandler.php Defines the access control handler for the shortcut set entity type.
ShortcutSetController class Drupal\shortcut\Controller core/modules/shortcut/src/Controller/ShortcutSetController.php Builds the page for administering shortcut sets.
ShortcutSetDeleteForm class Drupal\shortcut\Form core/modules/shortcut/src/Form/ShortcutSetDeleteForm.php Builds the shortcut set deletion form.
ShortcutSetForm class Drupal\shortcut core/modules/shortcut/src/ShortcutSetForm.php Form handler for the shortcut set entity edit forms.
ShortcutSetHalJsonAnonTest class Drupal\Tests\hal\Functional\shortcut core/modules/hal/tests/src/Functional/shortcut/ShortcutSetHalJsonAnonTest.php @group hal @group legacy 2
ShortcutSetHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\shortcut core/modules/hal/tests/src/Functional/shortcut/ShortcutSetHalJsonBasicAuthTest.php @group hal @group legacy
ShortcutSetHalJsonCookieTest class Drupal\Tests\hal\Functional\shortcut core/modules/hal/tests/src/Functional/shortcut/ShortcutSetHalJsonCookieTest.php @group hal @group legacy
ShortcutSetInterface interface Drupal\shortcut core/modules/shortcut/src/ShortcutSetInterface.php Provides an interface defining a shortcut set entity. 1 6
ShortcutSetJsonAnonTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonAnonTest.php @group rest
ShortcutSetJsonBasicAuthTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonBasicAuthTest.php @group rest
ShortcutSetJsonCookieTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetJsonCookieTest.php @group rest
ShortcutSetListBuilder class Drupal\shortcut core/modules/shortcut/src/ShortcutSetListBuilder.php Defines a class to build a listing of shortcut set entities.
ShortcutSetResourceTestBase abstract class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetResourceTestBase.php ResourceTestBase for ShortcutSet entity. 7 1
ShortcutSetsTest class Drupal\Tests\shortcut\Functional core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php Create, view, edit, delete, and change shortcut sets.
ShortcutSetStorage class Drupal\shortcut core/modules/shortcut/src/ShortcutSetStorage.php Defines a storage for shortcut_set entities.
ShortcutSetStorageInterface interface Drupal\shortcut core/modules/shortcut/src/ShortcutSetStorageInterface.php Defines an interface for shortcut_set entity storage classes. 1 3
ShortcutSetTest class Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7 core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetTest.php Tests D7 ShortcutSet source plugin.
ShortcutSetTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/ShortcutSetTest.php JSON:API integration test for the "ShortcutSet" config entity type.
ShortcutSetUsers class Drupal\shortcut\Plugin\migrate\destination core/modules/shortcut/src/Plugin/migrate/destination/ShortcutSetUsers.php Plugin annotation @MigrateDestination( id = "shortcut_set_users" ) 1
ShortcutSetUsers class Drupal\shortcut\Plugin\migrate\source\d7 core/modules/shortcut/src/Plugin/migrate/source/d7/ShortcutSetUsers.php Drupal 7 shortcut_set_users source from database.
ShortcutSetUsersTest class Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7 core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutSetUsersTest.php Tests D7 ShortcutSetUsers source plugin.
ShortcutSetXmlAnonTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlAnonTest.php @group rest
ShortcutSetXmlBasicAuthTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlBasicAuthTest.php @group rest
ShortcutSetXmlCookieTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutSetXmlCookieTest.php @group rest
ShortcutTest class Drupal\Tests\shortcut\Kernel\Plugin\migrate\source\d7 core/modules/shortcut/tests/src/Kernel/Plugin/migrate/source/d7/ShortcutTest.php Tests D7 Shortcut source plugin.
ShortcutTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/ShortcutTest.php JSON:API integration test for the "Shortcut" content entity type.
ShortcutTestBase abstract class Drupal\Tests\shortcut\Functional core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php Defines base class for shortcut test cases. 2
ShortcutTranslationUITest class Drupal\Tests\shortcut\Functional core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php Tests the shortcut translation UI.
ShortcutXmlAnonTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlAnonTest.php @group rest
ShortcutXmlBasicAuthTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlBasicAuthTest.php @group rest
ShortcutXmlCookieTest class Drupal\Tests\shortcut\Functional\Rest core/modules/shortcut/tests/src/Functional/Rest/ShortcutXmlCookieTest.php @group rest
ShowButtonsCommand class Drupal\views\Ajax core/modules/views/src/Ajax/ShowButtonsCommand.php Provides an AJAX command for showing the save and cancel buttons. 1
ShutdownFunctionsTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/ShutdownFunctionsTest.php Functional tests shutdown functions.
ShutdownFunctionTest class Drupal\KernelTests\Core\Bootstrap core/tests/Drupal/KernelTests/Core/Bootstrap/ShutdownFunctionTest.php Tests.
SimpleAnnotationReader final class Drupal\Component\Annotation\Doctrine core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php Simple Annotation Reader. 2
SimpleConfigSectionListTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/SimpleConfigSectionListTest.php Tests the test implementation of section storage.
SimpleConfigSectionStorage class Drupal\layout_builder_test\Plugin\SectionStorage core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php Provides section storage utilizing simple config. 1
SimplePageVariant class Drupal\Core\Render\Plugin\DisplayVariant core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php Provides a page display variant that simply renders the main content.
SimpleTestEntity class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityResolverManagerTest.php A concrete entity.
SimpleTestEntity class Drupal\Tests\content_moderation\Unit core/modules/content_moderation/tests/src/Unit/ContentModerationRouteSubscriberTest.php A concrete entity.
SimpletestUiPrinter class Drupal\Tests\Listeners core/tests/Drupal/Tests/Listeners/SimpletestUiPrinter.php Defines a class for providing html output links in the Simpletest UI. 1
SingleFlushStrategy class Drupal\Core\Render\Placeholder core/lib/Drupal/Core/Render/Placeholder/SingleFlushStrategy.php Defines the 'single_flush' placeholder strategy. 2
SingleInternalPropertyTestFieldItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/SingleInternalPropertyTestFieldItem.php Defines the 'Single Internal Property' entity test field type.
SingleVisibleProfileTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php Tests distribution profile support.
SiteCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/SiteCacheContext.php Defines the SiteCacheContext service, for "per site" caching. 2
SiteConfigureForm class Drupal\Core\Installer\Form core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php Provides the site configuration form.
SiteInformationForm class Drupal\system\Form core/modules/system/src/Form/SiteInformationForm.php Configure site information settings for this site. 1 1
SiteMaintenanceModeForm class Drupal\system\Form core/modules/system/src/Form/SiteMaintenanceModeForm.php Configure maintenance settings for this site. 1
SiteMaintenanceTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/SiteMaintenanceTest.php Tests access to site while in maintenance mode.
SiteNameTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php Tests that the site name can be set during a non-interactive installation.

Other projects


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