Classes, traits, and interfaces - 11.x - drupal | Drupal API
Skip to search
Can we use first and third party cookies and web beacons to
understand our audience, and to tailor promotions you see
Breadcrumb
Classes, traits, and interfaces - 11.x - drupal
Primary tabs
main
11.x
10.3.x
9.5.x
8.9.x
7.x
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
AAlterHooks
class
Drupal\aaa_hook_order_test\Hook
core/
modules/
system/
tests/
modules/
HookOrder/
aaa_hook_order_test/
src/
Hook/
AAlterHooks.php
This class contains hook implementations.
AbstractOperation
abstract class
Drupal\Composer\Plugin\Scaffold\Operations
composer/
Plugin/
Scaffold/
Operations/
AbstractOperation.php
Provides default behaviors for operations.
AbstractTest
abstract class
Drupal\Tests\Core\Foo
core/
tests/
PHPStan/
fixtures/
test-classes-missing-attributes.php
AcceptHeaderMatcher
class
Drupal\accept_header_routing_test\Routing
core/
modules/
system/
tests/
modules/
accept_header_routing_test/
src/
Routing/
AcceptHeaderMatcher.php
Filters routes based on the media type specified in the HTTP Accept headers.
AcceptHeaderMatcherTest
class
Drupal\Tests\Core\Routing
core/
tests/
Drupal/
Tests/
Core/
Routing/
AcceptHeaderMatcherTest.php
Confirm that the mime types partial matcher is functioning properly.
AcceptHeaderMiddleware
class
Drupal\accept_header_routing_test
core/
modules/
system/
tests/
modules/
accept_header_routing_test/
src/
AcceptHeaderMiddleware.php
Example implementation of "accept header"-based content negotiation.
AcceptHeaderRoutingTestServiceProvider
class
Drupal\accept_header_routing_test
core/
modules/
system/
tests/
modules/
accept_header_routing_test/
src/
AcceptHeaderRoutingTestServiceProvider.php
Service provider for the accept_header_routing_test module.
Access
class
Drupal\node\Plugin\views\filter
core/
modules/
node/
src/
Plugin/
views/
filter/
Access.php
Filter by node_access records.
AccessAnnouncementTest
class
Drupal\Tests\announcements_feed\FunctionalJavascript
core/
modules/
announcements_feed/
tests/
src/
FunctionalJavascript/
AccessAnnouncementTest.php
Test the access announcement permissions to get access announcement icon.
AccessArgumentsResolverFactory
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessArgumentsResolverFactory.php
Resolves the arguments to pass to an access check callable.
AccessArgumentsResolverFactoryInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessArgumentsResolverFactoryInterface.php
Constructs the arguments resolver instance to use when running access checks.
AccessAwareRouter
class
Drupal\Core\Routing
core/
lib/
Drupal/
Core/
Routing/
AccessAwareRouter.php
A router class for Drupal with access check and upcasting.
AccessAwareRouterInterface
interface
Drupal\Core\Routing
core/
lib/
Drupal/
Core/
Routing/
AccessAwareRouterInterface.php
Interface for a router class for Drupal with access check and upcasting.
AccessAwareRouterTest
class
Drupal\Tests\Core\Routing
core/
tests/
Drupal/
Tests/
Core/
Routing/
AccessAwareRouterTest.php
Tests Drupal\Core\Routing\AccessAwareRouter.
AccessCheck
class
Drupal\menu_test\Access
core/
modules/
system/
tests/
modules/
menu_test/
src/
Access/
AccessCheck.php
Checks access based on the 'menu_test' key in session.
AccessCheckInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessCheckInterface.php
An access check service determines access rules for particular routes.
AccessDeniedSubscriber
class
Drupal\user\EventSubscriber
core/
modules/
user/
src/
EventSubscriber/
AccessDeniedSubscriber.php
Redirects users when access is denied.
AccessDeniedTest
class
Drupal\Tests\system\Functional\System
core/
modules/
system/
tests/
src/
Functional/
System/
AccessDeniedTest.php
Tests page access denied functionality, including custom 403 pages.
AccessException
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessException.php
An exception thrown for access errors.
AccessGroupAnd
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessGroupAnd.php
An access group where all the dependencies must be allowed.
AccessGroupAndTest
class
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessGroupAndTest.php
Tests accessible groups.
AccessibleInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessibleInterface.php
Interface for checking access.
15
AccessibleTestingTrait
trait
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessibleTestingTrait.php
Helper methods testing accessible interfaces.
AccessInterface
interface
Drupal\Core\Routing\Access
core/
lib/
Drupal/
Core/
Routing/
Access/
AccessInterface.php
An access check service determines access rules for particular routes.
37
38
AccessManager
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessManager.php
Attaches access check services to routes and runs them on request.
AccessManagerInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessManagerInterface.php
Provides an interface for attaching and running access check services.
27
AccessManagerTest
class
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessManagerTest.php
Tests Drupal\Core\Access\AccessManager.
AccessPermissionTest
class
Drupal\Tests\user\Kernel\Views
core/
modules/
user/
tests/
src/
Kernel/
Views/
AccessPermissionTest.php
Tests views perm access plugin.
AccessPluginBase
abstract class
Drupal\views\Plugin\views\access
core/
modules/
views/
src/
Plugin/
views/
access/
AccessPluginBase.php
The base plugin to handle access control.
AccessPolicyBase
abstract class
Drupal\Core\Session
core/
lib/
Drupal/
Core/
Session/
AccessPolicyBase.php
Base class for access policies.
11
AccessPolicyInterface
interface
Drupal\Core\Session
core/
lib/
Drupal/
Core/
Session/
AccessPolicyInterface.php
Defines the access policy interface.
AccessPolicyProcessor
class
Drupal\Core\Session
core/
lib/
Drupal/
Core/
Session/
AccessPolicyProcessor.php
Processes access policies into permissions for an account.
AccessPolicyProcessorInFibersTest
class
Drupal\KernelTests\Core\Session
core/
tests/
Drupal/
KernelTests/
Core/
Session/
AccessPolicyProcessorInFibersTest.php
Tests the behavior of the access policy processor running inside fibers.
AccessPolicyProcessorInterface
interface
Drupal\Core\Session
core/
lib/
Drupal/
Core/
Session/
AccessPolicyProcessorInterface.php
Processes all added access policies until the full permissions are built.
AccessPolicyProcessorTest
class
Drupal\Tests\Core\Session
core/
tests/
Drupal/
Tests/
Core/
Session/
AccessPolicyProcessorTest.php
Tests the AccessPolicyProcessor service.
AccessPolicyScopeException
class
Drupal\Core\Session
core/
lib/
Drupal/
Core/
Session/
AccessPolicyScopeException.php
An exception thrown when permissions are returned for the wrong scope.
AccessResult
abstract class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResult.php
Value object for passing an access result with cacheability metadata.
217
AccessResultAllowed
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResultAllowed.php
Value object indicating an allowed access result, with cacheability metadata.
AccessResultForbidden
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResultForbidden.php
Value object for a forbidden access result, with cacheability metadata.
AccessResultForbiddenTest
class
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessResultForbiddenTest.php
Tests Drupal\Core\Access\AccessResultForbidden.
AccessResultInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResultInterface.php
Interface for access result value objects.
65
AccessResultNeutral
class
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResultNeutral.php
Value object indicating a neutral access result, with cacheability metadata.
AccessResultNeutralTest
class
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessResultNeutralTest.php
Tests Drupal\Core\Access\AccessResultNeutral.
AccessResultReasonInterface
interface
Drupal\Core\Access
core/
lib/
Drupal/
Core/
Access/
AccessResultReasonInterface.php
Interface for access result value objects with stored reason for developers.
15
AccessResultTest
class
Drupal\Tests\Core\Access
core/
tests/
Drupal/
Tests/
Core/
Access/
AccessResultTest.php
Tests Drupal\Core\Access\AccessResult.
AccessRoleTest
class
Drupal\Tests\user\Functional\Views
core/
modules/
user/
tests/
src/
Functional/
Views/
AccessRoleTest.php
Tests views role access plugin.
AccessRoleUITest
class
Drupal\Tests\user\Functional
core/
modules/
user/
tests/
src/
Functional/
AccessRoleUITest.php
Tests views role access plugin UI.
AccessRouteAlterSubscriber
class
Drupal\system\EventSubscriber
core/
modules/
system/
src/
EventSubscriber/
AccessRouteAlterSubscriber.php
Alters routes to add necessary requirements.
AccessTest
class
Drupal\Tests\views\Functional\Plugin
core/
modules/
views/
tests/
src/
Functional/
Plugin/
AccessTest.php
Tests pluggable access for views.
AccessTest
class
Drupal\Tests\file\Kernel
core/
modules/
file/
tests/
src/
Kernel/
AccessTest.php
Tests for the File access control.
Other projects
Buggy or inaccurate documentation?
Please
file an issue
. Need
support
? Need help programming? Connect with the
Drupal community
Search drupal 11.x
API Navigation
drupal 11.x
Topics
Classes
Functions
Constants
Globals
Files
Namespaces
Deprecated
Services
Elements
US