Classes, traits, and interfaces - 10.3.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 |
---|---|---|---|---|---|---|---|---|
Foo | class | Drupal\image_test\Plugin\ImageToolkit\Operation\test | core/ |
Builds an image toolkit operation. | ||||
FooAccessPolicy | class | Drupal\Tests\Core\Session | core/ |
|||||
FooCacheContext | class | Drupal\Tests\Core\Cache\Context | core/ |
Fake cache context class. | ||||
FooDerived | class | Drupal\image_test\Plugin\ImageToolkit\Operation\test | core/ |
Builds an image toolkit operation. | ||||
Form | class | Drupal\Core\Render\Element | core/ |
Provides a render element for a form. | ||||
FormActionXssTest | class | Drupal\KernelTests\Core\Form | core/ |
Ensures that a form's action attribute can't be exploited with XSS. | ||||
FormAjaxException | class | Drupal\Core\Form | core/ |
Custom exception to break out of AJAX form processing. | 2 | |||
FormAjaxResponseBuilder | class | Drupal\Core\Form | core/ |
Builds an AJAX form response. | 1 | 2 | ||
FormAjaxResponseBuilderInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for building AJAX form responses. | 1 | 1 | ||
FormAjaxResponseBuilderTest | class | Drupal\Tests\Core\Form | core/ |
@coversDefaultClass \Drupal\Core\Form\FormAjaxResponseBuilder[[api-linebreak]] @group Form | ||||
FormAjaxSubscriber | class | Drupal\Core\Form\EventSubscriber | core/ |
Wraps AJAX form submissions that are triggered via an exception. | 1 | 2 | ||
FormAjaxSubscriberTest | class | Drupal\Tests\Core\Form\EventSubscriber | core/ |
@coversDefaultClass \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber[[api-linebreak]] @group EventSubscriber | ||||
FormatDate | class | Drupal\migrate\Plugin\migrate\process | core/ |
Converts date/datetime from one format to another. | 1 | |||
FormatDateTest | class | Drupal\Tests\system\Functional\Common | core/ |
Tests the DateFormatterInterface::format() function. | ||||
FormatDateTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the format date process plugin. | ||||
FormattableMarkup | class | Drupal\Component\Render | core/ |
Formats a string for HTML display by replacing variable placeholders. | 1 | 100 | ||
FormattableMarkupKernelTest | class | Drupal\KernelTests\Component\Render | core/ |
Provides a test covering integration of FormattableMarkup with other systems. | ||||
FormattableMarkupTest | class | Drupal\Tests\Component\Render | core/ |
Tests the TranslatableMarkup class. | ||||
FormattedDateDiff | class | Drupal\Core\Datetime | core/ |
Contains a formatted time difference. | 1 | |||
FormatterBase | abstract class | Drupal\Core\Field | core/ |
Base class for 'Field formatter' plugin implementations. | 33 | 33 | ||
FormatterInterface | interface | Drupal\Core\Field | core/ |
Interface definition for field formatter plugins. | 1 | 2 | 1 | |
FormatterPluginManager | class | Drupal\Core\Field | core/ |
Plugin type manager for field formatters. | 5 | 2 | ||
FormatterPluginManagerTest | class | Drupal\Tests\field\Kernel | core/ |
Tests the field formatter plugin manager. | ||||
FormBase | abstract class | Drupal\Core\Form | core/ |
Provides a base class for forms. | 155 | 152 | ||
FormBuilder | class | Drupal\Core\Form | core/ |
Provides form building and processing. | 2 | 2 | ||
FormBuilderInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for form building and processing. | 1 | 30 | ||
FormBuilderTest | class | Drupal\Tests\Core\Form | core/ |
@coversDefaultClass \Drupal\Core\Form\FormBuilder[[api-linebreak]] @group Form | ||||
FormCache | class | Drupal\Core\Form | core/ |
Encapsulates the caching of a form and its form state. | 1 | 2 | ||
FormCacheInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for the caching of a form and its form state. | 2 | |||
FormCacheTest | class | Drupal\KernelTests\Core\Form | core/ |
Tests FormBuilder caching. | ||||
FormCacheTest | class | Drupal\Tests\Core\Form | core/ |
@coversDefaultClass \Drupal\Core\Form\FormCache[[api-linebreak]] @group Form | ||||
FormController | abstract class | Drupal\Core\Controller | core/ |
Common base class for form interstitial controllers. | 5 | 4 | ||
FormController | class | Drupal\condition_test | core/ |
Routing controller class for condition_test testing of condition forms. | 1 | |||
FormDefaultHandlersTest | class | Drupal\KernelTests\Core\Form | core/ |
Tests automatically added form handlers. | ||||
FormElement | class | Drupal\Core\Render\Attribute | core/ |
Defines a form element plugin attribute object. | 38 | |||
FormElement | in drupal:10.3.0 and is removed from drupal:12.0.0. use \Drupal\Core\Render\Element\FormElementBase instead. |
abstract class | Drupal\Core\Render\Element | core/ |
Provides a base class for form element plugins. | 1 | 1 | |
FormElement | class | Drupal\Core\Render\Annotation | core/ |
Defines a form element plugin annotation object. | ||||
FormElementBase | abstract class | Drupal\Core\Render\Element | core/ |
Provides a base class for form element plugins. | 28 | 3 | ||
FormElementBase | abstract class | Drupal\config_translation\FormElement | core/ |
Provides a common base class for form elements. | 5 | |||
FormElementHelper | class | Drupal\Core\Form | core/ |
Provides common functionality for form elements. | 2 | |||
FormElementHelperTest | class | Drupal\Tests\Core\Form | core/ |
Tests the form element helper. | ||||
FormElementInlineErrorTest | class | Drupal\Tests\inline_form_errors\Kernel | core/ |
Tests messages on form elements. | ||||
FormElementInterface | interface | Drupal\Core\Render\Element | core/ |
Provides an interface for form element plugins. | 1 | 1 | ||
FormElementLabelTest | class | Drupal\Tests\system\Kernel\Form | core/ |
Tests for form_element_label theme hook. | ||||
FormElementMaxlengthTest | class | Drupal\Tests\system\Kernel\Form | core/ |
Tests the maxlength HTML attribute on form elements. | ||||
FormElementsRenderTest | class | Drupal\Tests\system\Kernel\Common | core/ |
Performs integration tests on \Drupal::service('renderer')->render(). | ||||
FormErrorHandler | class | Drupal\inline_form_errors | core/ |
Produces inline form errors. | 1 | |||
FormErrorHandler | class | Drupal\Core\Form | core/ |
Handles form errors. | 1 | 1 | 2 | |
FormErrorHandlerCKEditor5Test | class | Drupal\Tests\inline_form_errors\FunctionalJavascript | core/ |
Tests the inline errors fragment link to a CKEditor5-enabled textarea. | ||||
FormErrorHandlerFileUploadTest | class | Drupal\Tests\inline_form_errors\Functional | core/ |
Tests file upload scenario's with Inline Form Errors. |
Pagination
- Previous page
- Page 80
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.