Classes, traits, and interfaces - 8.9.x - drupal
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 |
---|---|---|---|---|---|---|---|---|
AccountSwitcherInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for a service for safe account switching. | 1 | 1 | ||
AccountSwitcherTest | class | Drupal\KernelTests\Core\Session | core/ |
Test case for account switching. | ||||
Action | class | Drupal\Core\Annotation | core/ |
Defines an Action annotation object. | ||||
Action | class | Drupal\action\Plugin\migrate\source | core/ |
Drupal action source from database. | ||||
Action | class | Drupal\system\Entity | core/ |
Defines the configured action entity. | 18 | |||
ActionAddForm | class | Drupal\action\Form | core/ |
Provides a form for action add forms. | 1 | 2 | ||
ActionAddForm | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionEditForm instead. |
class | Drupal\action | core/ |
Provides a form for action add forms. | |||
ActionAdminManageForm | class | Drupal\action\Form | core/ |
Provides a configuration form for configurable actions. | ||||
ActionAjaxTest | class | Drupal\action_form_ajax_test\Plugin\Action | core/ |
Plugin used for testing AJAX in action config entity forms. | ||||
ActionBase | abstract class | Drupal\Core\Action | core/ |
Provides a base implementation for an Action plugin. | 9 | 8 | ||
ActionConfigEntityInterface | interface | Drupal\system | core/ |
Provides an interface defining a action entity. | 1 | 3 | ||
ActionConfigTest | class | Drupal\Tests\action\Functional\Update | core/ |
Tests removing action module's configuration. | ||||
ActionDeleteForm | class | Drupal\action\Form | core/ |
Builds a form to delete an action. | ||||
ActionEditForm | class | Drupal\action\Form | core/ |
Provides a form for action edit forms. | 1 | 2 | ||
ActionEditForm | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionEditForm instead. |
class | Drupal\action | core/ |
Provides a form for action edit forms. | |||
ActionFormAjaxTest | class | Drupal\Tests\action\FunctionalJavascript | core/ |
Tests action plugins using Javascript. | ||||
ActionFormBase | abstract class | Drupal\action\Form | core/ |
Provides a base form for action forms. | 3 | 1 | ||
ActionFormBase | in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\action\Form\ActionFormBase instead. |
abstract class | Drupal\action | core/ |
Provides a base form for action forms. | |||
ActionHalJsonAnonTest | class | Drupal\Tests\system\Functional\Hal | core/ |
@group hal | ||||
ActionHalJsonBasicAuthTest | class | Drupal\Tests\system\Functional\Hal | core/ |
@group hal | ||||
ActionHalJsonCookieTest | class | Drupal\Tests\system\Functional\Hal | core/ |
@group hal | ||||
ActionInterface | interface | Drupal\Core\Action | core/ |
Provides an interface for an Action plugin. | 1 | 1 | ||
ActionJsonAnonTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActionJsonBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActionJsonCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActionListBuilder | class | Drupal\action | core/ |
Defines a class to build a listing of action entities. | ||||
ActionListTest | class | Drupal\Tests\action\Functional | core/ |
Test behaviors when visiting the action listing page. | ||||
ActionLocalTasksTest | class | Drupal\Tests\action\Unit\Menu | core/ |
Tests action local tasks. | 1 | |||
ActionManager | class | Drupal\Core\Action | core/ |
Provides an Action plugin manager. | 2 | 2 | ||
ActionPluginCollection | class | Drupal\Core\Action | core/ |
Provides a container for lazily loading Action plugins. | 1 | |||
ActionResourceTestBase | in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\system\Functional\Rest\ActionResourceTestBase instead. |
abstract class | Drupal\Tests\rest\Functional\EntityResource\Action | core/ |
||||
ActionResourceTestBase | abstract class | Drupal\Tests\system\Functional\Rest | core/ |
10 | 4 | |||
Actions | class | Drupal\Core\Render\Element | core/ |
Provides a wrapper element to group one or more buttons in a form. | ||||
ActionsTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Actions @group Render | ||||
ActionTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "Action" config entity type. | ||||
ActionTest | class | Drupal\Tests\system\Kernel\Action | core/ |
Tests action plugins. | ||||
ActionTest | class | Drupal\Tests\action\Kernel\Plugin\migrate\source | core/ |
Tests actions source plugin. | ||||
ActionUninstallTest | class | Drupal\Tests\action\Functional | core/ |
Tests that uninstalling actions does not remove other module's actions. | ||||
ActionXmlAnonTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActionXmlBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActionXmlCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group rest | ||||
ActiveLinkResponseFilter | class | Drupal\Core\EventSubscriber | core/ |
Subscribes to filter HTML responses, to set the 'is-active' class on links. | 1 | 2 | ||
ActiveLinkResponseFilterTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter @group EventSubscriber | ||||
ActiveTheme | class | Drupal\Core\Theme | core/ |
Defines a theme and its information needed at runtime. | 4 | |||
ActiveThemeLegacyTest | class | Drupal\KernelTests\Core\Theme | core/ |
Tests legacy code in ActiveTheme. | ||||
ActiveTopicsBlock | class | Drupal\forum\Plugin\Block | core/ |
Provides an 'Active forum topics' block. | ||||
ActiveWorkspaceCheck | class | Drupal\workspaces\Access | core/ |
Determines access to routes based on the presence of an active workspace. | 1 | 2 | ||
ActiveWorkspaceCheckTest | class | Drupal\Tests\workspaces\Unit | core/ |
@coversDefaultClass \Drupal\workspaces\Access\ActiveWorkspaceCheck | ||||
ActiveWorkspaceUpdateTest | class | Drupal\Tests\workspaces\Functional\UpdateSystem | core/ |
Tests that there is no active workspace during database updates. | ||||
AddBlockForm | class | Drupal\layout_builder\Form | core/ |
Provides a form to add a block. | 1 |
Pagination
- Previous page
- Page 2
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.