Classes, traits, and interfaces in Drupal 8
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
Name | Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|
AccountSwitcherInterface | interface |
Drupal\ |
core/ |
Defines an interface for a service for safe account switching. | 1 | 1 | |
AccountSwitcherTest | class |
Drupal\ |
core/ |
Test case for account switching. | |||
Action | class |
Drupal\ |
core/ |
Defines an Action annotation object. | |||
Action | class |
Drupal\ |
core/ |
Defines the configured action entity. | 18 | ||
Action | class |
Drupal\ |
core/ |
Drupal action source from database. | |||
ActionAddForm Deprecated | class |
Drupal\ |
core/ |
Provides a form for action add forms. | |||
ActionAddForm | class |
Drupal\ |
core/ |
Provides a form for action add forms. | 1 | 2 | |
ActionAdminManageForm | class |
Drupal\ |
core/ |
Provides a configuration form for configurable actions. | |||
ActionAjaxTest | class |
Drupal\ |
core/ |
Plugin used for testing AJAX in action config entity forms. | |||
ActionBase | abstract class |
Drupal\ |
core/ |
Provides a base implementation for an Action plugin. | 9 | 8 | |
ActionConfigEntityInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a action entity. | 1 | 3 | |
ActionConfigTest | class |
Drupal\ |
core/ |
Tests removing action module's configuration. | |||
ActionDeleteForm | class |
Drupal\ |
core/ |
Builds a form to delete an action. | |||
ActionEditForm Deprecated | class |
Drupal\ |
core/ |
Provides a form for action edit forms. | |||
ActionEditForm | class |
Drupal\ |
core/ |
Provides a form for action edit forms. | 1 | 2 | |
ActionFormAjaxTest | class |
Drupal\ |
core/ |
Tests action plugins using Javascript. | |||
ActionFormBase Deprecated | abstract class |
Drupal\ |
core/ |
Provides a base form for action forms. | |||
ActionFormBase | abstract class |
Drupal\ |
core/ |
Provides a base form for action forms. | 3 | 1 | |
ActionHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | |||
ActionHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
ActionHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
ActionInterface | interface |
Drupal\ |
core/ |
Provides an interface for an Action plugin. | 1 | 1 | |
ActionJsonAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
ActionJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
ActionJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
ActionListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of action entities. | |||
ActionListTest | class |
Drupal\ |
core/ |
Test behaviors when visiting the action listing page. | |||
ActionLocalTasksTest | class |
Drupal\ |
core/ |
Tests action local tasks. | 1 | ||
ActionManager | class |
Drupal\ |
core/ |
Provides an Action plugin manager. | 2 | 2 | |
ActionPluginCollection | class |
Drupal\ |
core/ |
Provides a container for lazily loading Action plugins. | 1 | ||
ActionResourceTestBase | abstract class |
Drupal\ |
core/ |
10 | 4 | ||
ActionResourceTestBase Deprecated | abstract class |
Drupal\ |
core/ |
||||
Actions | class |
Drupal\ |
core/ |
Provides a wrapper element to group one or more buttons in a form. | |||
ActionsTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Actions @group Render | |||
ActionTest | class |
Drupal\ |
core/ |
JSON:API integration test for the "Action" config entity type. | |||
ActionTest | class |
Drupal\ |
core/ |
Tests action plugins. | |||
ActionTest | class |
Drupal\ |
core/ |
Tests actions source plugin. | |||
ActionUninstallTest | class |
Drupal\ |
core/ |
Tests that uninstalling actions does not remove other module's actions. | |||
ActionXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
ActionXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
ActionXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
ActiveLinkResponseFilter | class |
Drupal\ |
core/ |
Subscribes to filter HTML responses, to set the 'is-active' class on links. | 1 | 2 | |
ActiveLinkResponseFilterTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter @group EventSubscriber | |||
ActiveTheme | class |
Drupal\ |
core/ |
Defines a theme and its information needed at runtime. | 4 | ||
ActiveThemeLegacyTest | class |
Drupal\ |
core/ |
Tests legacy code in ActiveTheme. | |||
ActiveTopicsBlock | class |
Drupal\ |
core/ |
Provides an 'Active forum topics' block. | |||
ActiveWorkspaceCheck | class |
Drupal\ |
core/ |
Determines access to routes based on the presence of an active workspace. | 1 | 2 | |
ActiveWorkspaceCheckTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\workspaces\Access\ActiveWorkspaceCheck | |||
ActiveWorkspaceUpdateTest | class |
Drupal\ |
core/ |
Tests that there is no active workspace during database updates. | |||
AddBlockForm | class |
Drupal\ |
core/ |
Provides a form to add a block. | 1 |