Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| FormClassMissingName | class | Drupal\Tests\Core\Routing | core/ |
Test class. | ||||
| FormClassRouteCondition | class | Drupal\Tests\Core\Routing | core/ |
Test class. | ||||
| FormClassRouteLocale | class | Drupal\Tests\Core\Routing | core/ |
Test class. | ||||
| FormClassRouteLocalizedPaths | class | Drupal\Tests\Core\Routing | core/ |
Test class. | ||||
| FormController | abstract class | Drupal\Core\Controller | core/ |
Common base class for form interstitial controllers. | 3 | 2 | ||
| 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. | 39 | |||
| 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 | 4 | ||
| 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. | 2 | 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 | 2 | 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. | ||||
| FormErrorHandlerInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for handling form errors. | 1 | 2 | ||
| FormErrorHandlerTest | class | Drupal\Tests\inline_form_errors\Unit | core/ |
Tests Drupal\inline_form_errors\FormErrorHandler. | ||||
| FormErrorHandlerTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\FormErrorHandler. | ||||
| FormFileUploader | class | Drupal\file\Upload | core/ |
Helper class for multiple form file uploads. | 3 | |||
| FormGroupingElementsTest | class | Drupal\FunctionalJavascriptTests\Core\Form | core/ |
Tests for form grouping elements. | ||||
| FormHelper | class | Drupal\Core\Form | core/ |
Provides helpers to operate on forms. | 6 | |||
| FormHelperTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\FormHelper. | ||||
| FormHooks | class | Drupal\admin\Hook | core/ |
Provides form related hook implementations. | ||||
| FormHooks | class | Drupal\default_admin\Hook | core/ |
Provides form related hook implementations. | ||||
| FormInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for a Form. | 42 | 45 | ||
| FormModeAccessCheck | class | Drupal\field_ui\Access | core/ |
Defines an access check for entity form mode routes. | 2 | |||
| FormObjectTest | class | Drupal\Tests\system\Kernel\Form | core/ |
Tests building a form from an object. | ||||
| FormObjectTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests building a form from an object. | ||||
| FormOperations | class | Drupal\workspaces\Hook | core/ |
Defines a class for reacting to form operations. | ||||
| FormPreprocess | class | Drupal\Core\Form | core/ |
Initial preprocess callbacks for the form system. | 1 | 2 | ||
| FormRouteEnhancer | class | Drupal\Core\Routing\Enhancer | core/ |
Enhancer to add a wrapping controller for _form routes. | 2 | |||
| FormState | class | Drupal\Core\Form | core/ |
Stores information about the state of a form. | 89 | |||
| FormStateDecoratorBase | abstract class | Drupal\Core\Form | core/ |
Decorates another form state. | 2 | 1 | ||
| FormStateDecoratorBaseTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\FormStateDecoratorBase. | ||||
| FormStateInterface | interface | Drupal\Core\Form | core/ |
Provides an interface for an object containing the current state of a form. | 3 | 927 | ||
| FormStatePersistTest | class | Drupal\Tests\system\Kernel\Form | core/ |
Tests that the form state persists across multiple requests. | ||||
| FormStateTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\FormState. | ||||
| FormStateValuesTrait | trait | Drupal\Core\Form | core/ |
Provides methods to manage form state values. | 1 | |||
| FormStateValuesTraitStub | class | Drupal\Tests\Core\Form | core/ |
Stub class with trait for testing. | ||||
| FormStateValuesTraitTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\FormStateValuesTrait. | ||||
| FormStoragePageCacheTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests form storage from cached pages. | ||||
| FormSubmitter | class | Drupal\Core\Form | core/ |
Provides submission processing for forms. | 1 | 2 | 2 |
Pagination
- Previous page
- Page 91
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.