Classes, traits, and interfaces - 11.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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
AbstractOperation | abstract class | Drupal\Composer\Plugin\Scaffold\Operations | composer/ |
Provides default behaviors for operations. | 3 | |||
AcceptHeaderMatcher | class | Drupal\accept_header_routing_test\Routing | core/ |
Filters routes based on the media type specified in the HTTP Accept headers. | 1 | 2 | ||
AcceptHeaderMatcherTest | class | Drupal\Tests\Core\Routing | core/ |
Confirm that the mime types partial matcher is functioning properly. | ||||
AcceptHeaderMiddleware | class | Drupal\accept_header_routing_test | core/ |
Example implementation of "accept header"-based content negotiation. | ||||
AcceptHeaderRoutingTestServiceProvider | class | Drupal\accept_header_routing_test | core/ |
Service provider for the accept_header_routing_test module. | ||||
Access | class | Drupal\node\Plugin\views\filter | core/ |
Filter by node_access records. | ||||
AccessAnnouncementTest | class | Drupal\Tests\announcements_feed\FunctionalJavascript | core/ |
Test the access announcement permissions to get access announcement icon. | ||||
AccessArgumentsResolverFactory | class | Drupal\Core\Access | core/ |
Resolves the arguments to pass to an access check callable. | ||||
AccessArgumentsResolverFactoryInterface | interface | Drupal\Core\Access | core/ |
Constructs the arguments resolver instance to use when running access checks. | 1 | |||
AccessAwareRouter | class | Drupal\Core\Routing | core/ |
A router class for Drupal with access check and upcasting. | 2 | |||
AccessAwareRouterInterface | interface | Drupal\Core\Routing | core/ |
Interface for a router class for Drupal with access check and upcasting. | 1 | 6 | ||
AccessAwareRouterTest | class | Drupal\Tests\Core\Routing | core/ |
@coversDefaultClass \Drupal\Core\Routing\AccessAwareRouter @group Routing | ||||
AccessCheck | class | Drupal\menu_test\Access | core/ |
Checks access based on the 'menu_test' key in session. | 2 | |||
AccessCheckInterface | interface | Drupal\Core\Access | core/ |
An access check service determines access rules for particular routes. | 2 | 2 | ||
AccessDeniedSubscriber | class | Drupal\user\EventSubscriber | core/ |
Redirects users when access is denied. | 2 | |||
AccessDeniedTest | class | Drupal\Tests\system\Functional\System | core/ |
Tests page access denied functionality, including custom 403 pages. | ||||
AccessException | class | Drupal\Core\Access | core/ |
An exception thrown for access errors. | 1 | 5 | ||
AccessGroupAnd | class | Drupal\block_content\Access | core/ |
An access group where all the dependencies must be allowed. | 2 | |||
AccessGroupAndTest | class | Drupal\Tests\block_content\Unit\Access | core/ |
Tests accessible groups. | ||||
AccessibleInterface | interface | Drupal\Core\Access | core/ |
Interface for checking access. | 8 | 18 | ||
AccessibleTestingTrait | trait | Drupal\Tests\block_content\Unit\Access | core/ |
Helper methods testing accessible interfaces. | ||||
AccessInterface | interface | Drupal\Core\Routing\Access | core/ |
An access check service determines access rules for particular routes. | 37 | 38 | ||
AccessManager | class | Drupal\Core\Access | core/ |
Attaches access check services to routes and runs them on request. | 1 | |||
AccessManagerInterface | interface | Drupal\Core\Access | core/ |
Provides an interface for attaching and running access check services. | 1 | 27 | ||
AccessManagerTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\AccessManager @group Access | ||||
AccessPermissionTest | class | Drupal\Tests\user\Kernel\Views | core/ |
Tests views perm access plugin. | ||||
AccessPluginBase | abstract class | Drupal\views\Plugin\views\access | core/ |
The base plugin to handle access control. | 5 | 5 | ||
AccessPolicyBase | abstract class | Drupal\Core\Session | core/ |
Base class for access policies. | 11 | 2 | ||
AccessPolicyInterface | interface | Drupal\Core\Session | core/ |
Defines the access policy interface. | 1 | 2 | ||
AccessPolicyProcessor | class | Drupal\Core\Session | core/ |
Processes access policies into permissions for an account. | 1 | |||
AccessPolicyProcessorInterface | interface | Drupal\Core\Session | core/ |
Processes all added access policies until the full permissions are built. | 1 | 2 | ||
AccessPolicyProcessorTest | class | Drupal\Tests\Core\Session | core/ |
Tests the AccessPolicyProcessor service. | ||||
AccessPolicyScopeException | class | Drupal\Core\Session | core/ |
An exception thrown when permissions are returned for the wrong scope. | 1 | |||
AccessResult | abstract class | Drupal\Core\Access | core/ |
Value object for passing an access result with cacheability metadata. | 3 | 225 | ||
AccessResultAllowed | class | Drupal\Core\Access | core/ |
Value object indicating an allowed access result, with cacheability metadata. | 8 | |||
AccessResultForbidden | class | Drupal\Core\Access | core/ |
Value object indicating a forbidden access result, with cacheability metadata. | 6 | |||
AccessResultForbiddenTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\AccessResultForbidden @group Access | ||||
AccessResultInterface | interface | Drupal\Core\Access | core/ |
Interface for access result value objects. | 3 | 29 | ||
AccessResultNeutral | class | Drupal\Core\Access | core/ |
Value object indicating a neutral access result, with cacheability metadata. | 7 | |||
AccessResultNeutralTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\AccessResultNeutral @group Access | ||||
AccessResultReasonInterface | interface | Drupal\Core\Access | core/ |
Interface for access result value objects with stored reason for developers. | 2 | 16 | ||
AccessResultTest | class | Drupal\Tests\Core\Access | core/ |
@coversDefaultClass \Drupal\Core\Access\AccessResult @group Access | ||||
AccessRoleTest | class | Drupal\Tests\user\Functional\Views | core/ |
Tests views role access plugin. | ||||
AccessRoleUITest | class | Drupal\Tests\user\Functional | core/ |
Tests views role access plugin UI. | ||||
AccessRouteAlterSubscriber | class | Drupal\system\EventSubscriber | core/ |
Alters routes to add necessary requirements. | 2 | |||
AccessTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests pluggable access for views. | ||||
AccessTest | class | Drupal\Tests\file\Kernel | core/ |
Tests for the File access control. | ||||
AccessTestBase | abstract class | Drupal\Tests\user\Functional\Views | core/ |
A common test base class for the user access plugin tests. | 1 | |||
AccountEvents | final class | Drupal\Core\Session | core/ |
Defines events for the account system. | 1 | |||
AccountForm | abstract class | Drupal\user | core/ |
Form controller for the user account forms. | 2 |
Pagination
- Page 1
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.