Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
StaticMenuLinkOverridesTest class Drupal\Tests\Core\Menu core/tests/Drupal/Tests/Core/Menu/StaticMenuLinkOverridesTest.php Tests Drupal\Core\Menu\StaticMenuLinkOverrides.
StaticReflectionClass class Drupal\Component\Annotation\Doctrine core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionClass.php
StaticReflectionParser class Drupal\Component\Annotation\Doctrine core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php Parses a file for namespaces/use/class declarations. 1 9
StaticReflectionParser class Drupal\migrate\Plugin\Discovery core/modules/migrate/src/Plugin/Discovery/StaticReflectionParser.php Allows getting the reflection parser for the parent class.
StaticReflectionParserTest class Drupal\Tests\Component\Annotation\Doctrine core/tests/Drupal/Tests/Component/Annotation/Doctrine/StaticReflectionParserTest.php Tests Drupal\Component\Annotation\Doctrine\StaticReflectionParser.
StaticRouteDiscoveryBase abstract class Drupal\Core\Routing core/lib/Drupal/Core/Routing/StaticRouteDiscoveryBase.php Provides functionality for a class subscribed to RoutingEvents::STATIC. 2
StaticTest class Drupal\views_test_data\Plugin\views\access core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php Tests a static access plugin.
StaticTranslation class Drupal\Core\StringTranslation\Translator core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php String translator with a static cache for translations. 2
StaticTrustedCallbackHelper class Drupal\Core\Security core/lib/Drupal/Core/Security/StaticTrustedCallbackHelper.php Defines a class for performing trusted callbacks in a static context. 2
StatisticsLastCommentName class Drupal\comment\Plugin\views\sort core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php Sort handler, sorts by last comment name which can be in 2 different fields.
StatisticsLastCommentName class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php Field handler to present the name of the last comment poster.
StatisticsLastUpdated class Drupal\comment\Plugin\views\sort core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php Sort handler for the newer of last comment / entity updated.
StatisticsLastUpdated class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php Field handler to display the newer of last comment / node updated.
StatisticsLastUpdated class Drupal\comment\Plugin\views\filter core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php Filter handler for the newer of last comment / node updated.
Status class Drupal\media\Plugin\views\filter core/modules/media/src/Plugin/views/filter/Status.php Filter by published status.
Status class Drupal\file\Plugin\views\filter core/modules/file/src/Plugin/views/filter/Status.php Filter by file status.
Status class Drupal\node\Plugin\views\filter core/modules/node/src/Plugin/views/filter/Status.php Filters out unpublished content if the current user cannot view it.
StatusCheckEvent final class Drupal\package_manager\Event core/modules/package_manager/src/Event/StatusCheckEvent.php Event fired to check the status of the system to use Package Manager. 20
StatusCheckTrait trait Drupal\package_manager core/modules/package_manager/src/StatusCheckTrait.php Contains helper methods to run status checks on a stage. 3
StatusCheckTraitTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/StatusCheckTraitTest.php Tests Status Check Trait.
StatusCommand class Drupal\system\Command core/modules/system/src/Command/StatusCommand.php Prints status information about the site. 1
StatusCommandTest class Drupal\Tests\system\Kernel\Command core/modules/system/tests/src/Kernel/Command/StatusCommandTest.php Tests the 'system:status' command.
StatusExtraTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/StatusExtraTest.php Tests the node.status_extra field handler.
StatusItem class Drupal\user core/modules/user/src/StatusItem.php Defines the 'status' entity field type. 3
StatusMessages class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/StatusMessages.php Provides a messages element.
StatusProfileWithoutVersionTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/StatusProfileWithoutVersionTest.php Tests the Status Report page if the installation profile has no version.
StatusReport class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/StatusReport.php Creates status report page element. 2
StatusReportPage class Drupal\system\Element core/modules/system/src/Element/StatusReportPage.php Creates status report page element. 1
StatusReportPageTest class Drupal\Tests\system\Kernel\Element core/modules/system/tests/src/Kernel/Element/StatusReportPageTest.php Tests the status report page element.
StatusReportTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/StatusReportTest.php Tests the status report element.
StatusTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/StatusTest.php Tests output on the status overview page.
StickyNode class Drupal\node\Plugin\Action core/modules/node/src/Plugin/Action/StickyNode.php Makes a node sticky.
StorableConfigBase abstract class Drupal\Core\Config core/lib/Drupal/Core/Config/StorableConfigBase.php Provides a base class for configuration objects with storage support. 2 4
StorageBase abstract class Drupal\Core\KeyValueStore core/lib/Drupal/Core/KeyValueStore/StorageBase.php Provides a base class for key/value storage implementations. 2
StorageCacheInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageCacheInterface.php Defines an interface for cached configuration storage. 1 1
StorageComparer class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageComparer.php Defines a config storage comparer. 17
StorageComparerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageComparerInterface.php Defines an interface for comparison of configuration storage objects. 1
StorageComparerTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/StorageComparerTest.php Tests Drupal\Core\Config\StorageComparer.
StorageCopyTrait trait Drupal\Core\Config core/lib/Drupal/Core/Config/StorageCopyTrait.php Utility trait to copy configuration from one storage to another. 4
StorageCopyTraitTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php Tests Drupal\Core\Config\StorageCopyTrait.
StorageException class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageException.php An exception thrown in case of storage operation errors. 1
StorageInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageInterface.php Defines an interface for configuration storage. 13 57
StorageManagerInterface interface Drupal\Core\Config core/lib/Drupal/Core/Config/StorageManagerInterface.php Interface for a storage manager. 2 1
StorageReplaceDataWrapper class Drupal\config core/modules/config/src/StorageReplaceDataWrapper.php Wraps a configuration storage to allow replacing specific configuration data. 2
StorageReplaceDataWrapperTest class Drupal\KernelTests\Core\Config\Storage core/tests/Drupal/KernelTests/Core/Config/Storage/StorageReplaceDataWrapperTest.php Tests StorageReplaceDataWrapper operations.
StorageTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/StorageTest.php Tests the UI of storage properties of views.
StorageTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/StorageTest.php Tests a multistep form using form storage.
StorageTestBase abstract class Drupal\KernelTests\Core\KeyValueStore core/tests/Drupal/KernelTests/Core/KeyValueStore/StorageTestBase.php Base class for testing key-value storages. 3
StorageTransformerException class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageTransformerException.php Thrown by config storage transformers if they cannot acquire a lock. 2
StorageTransformEvent class Drupal\Core\Config core/lib/Drupal/Core/Config/StorageTransformEvent.php Class StorageTransformEvent. 2

Other projects


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