Classes, traits, and interfaces - 9.5.x - drupal

Primary tabs

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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
FileUploadHandlerTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/FileUploadHandlerTest.php Tests the file upload handler.
FileUploadJsonBasicAuthTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/FileUploadJsonBasicAuthTest.php @group file
FileUploadJsonCookieTest class Drupal\Tests\file\Functional core/modules/file/tests/src/Functional/FileUploadJsonCookieTest.php @group file
FileUploadResource class Drupal\file\Plugin\rest\resource core/modules/file/src/Plugin/rest/resource/FileUploadResource.php File upload resource.
FileUploadResourceTestBase abstract class Drupal\Tests\rest\Functional core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php Tests binary data file upload route. 3 3
FileUploadResult class Drupal\file\Upload core/modules/file/src/Upload/FileUploadResult.php Value object for a file upload result.
FileUploadSanitizeNameEvent class Drupal\Core\File\Event core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php An event during file upload that lets subscribers sanitize the filename. 8
FileUploadSanitizeNameEventTest class Drupal\Tests\Core\File core/tests/Drupal/Tests/Core/File/FileUploadSanitizeNameEventTest.php FileUploadSanitizeNameEvent tests.
FileUploadTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/FileUploadTest.php Tests binary data file upload route.
FileUri class Drupal\file\Plugin\migrate\process\d6 core/modules/file/src/Plugin/migrate/process/d6/FileUri.php Process the file URL into a D8 compatible URL. 1
FileUriFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/FileUriFormatter.php Formatter to render the file URI to its download path.
FileUriItem class Drupal\file\Plugin\Field\FieldType core/modules/file/src/Plugin/Field/FieldType/FileUriItem.php File-specific plugin implementation of a URI item to provide a full URL.
FileUriItemTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/FileUriItemTest.php File URI field item test.
FileUriTest class Drupal\Tests\file\Unit\Plugin\migrate\process\d6 core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FileUriTest.php @coversDefaultClass \Drupal\file\Plugin\migrate\process\d6\FileUri @group file
FileUriUnique class Drupal\file\Plugin\Validation\Constraint core/modules/file/src/Plugin/Validation/Constraint/FileUriUnique.php Supports validating file URIs.
FileUrlGenerator class Drupal\Core\File core/lib/Drupal/Core/File/FileUrlGenerator.php Default implementation for the file URL generator service. 2
FileUrlGeneratorInterface interface Drupal\Core\File core/lib/Drupal/Core/File/FileUrlGeneratorInterface.php Generates file URLs for a stream to an external or local file. 1 14
FileUrlGeneratorTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/FileUrlGeneratorTest.php @coversDefaultClass \Drupal\Core\File\FileUrlGenerator
FileUrlTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/FileUrlTest.php Tests the file url.
FileUsageBase abstract class Drupal\file\FileUsage core/modules/file/src/FileUsage/FileUsageBase.php Defines the base class for database file usage backend. 2 1
FileUsageInterface interface Drupal\file\FileUsage core/modules/file/src/FileUsage/FileUsageInterface.php File usage backend interface. 1 2
FileUsed class Drupal\file_test_get_ids\Plugin\migrate\source\d7 core/modules/file/tests/modules/file_test_get_ids/src/Plugin/migrate/source/d7/FileUsed.php Drupal 7 file source from database restricted to used files.
FileValidationConstraint class Drupal\file\Plugin\Validation\Constraint core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraint.php Validation File constraint.
FileValidationConstraintValidator class Drupal\file\Plugin\Validation\Constraint core/modules/file/src/Plugin/Validation/Constraint/FileValidationConstraintValidator.php Checks that a file referenced in a file field is valid.
FileValidationException class Drupal\file\Upload core/modules/file/src/Upload/FileValidationException.php Provides an exception for upload validation errors. 1
FileVideoFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/FileVideoFormatter.php Plugin implementation of the 'file_video' formatter.
FileVideoFormatterTest class Drupal\Tests\file\Functional\Formatter core/modules/file/tests/src/Functional/Formatter/FileVideoFormatterTest.php @coversDefaultClass \Drupal\file\Plugin\Field\FieldFormatter\FileVideoFormatter @group file
FileViewsData class Drupal\file core/modules/file/src/FileViewsData.php Provides views data for the file entity type.
FileViewsDataTest class Drupal\Tests\options\Kernel\Views core/modules/options/tests/src/Kernel/Views/FileViewsDataTest.php Tests file views data.
FileViewsFieldAccessTest class Drupal\Tests\file\Kernel\Views core/modules/file/tests/src/Kernel/Views/FileViewsFieldAccessTest.php Tests base field access in Views for the file entity.
FileWidget class Drupal\file\Plugin\Field\FieldWidget core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php Plugin implementation of the 'file_generic' widget. 1 1
FileWidgetAjaxController class Drupal\file\Controller core/modules/file/src/Controller/FileWidgetAjaxController.php Defines a controller to respond to file widget AJAX requests.
FileWriteException class Drupal\Core\File\Exception core/lib/Drupal/Core/File/Exception/FileWriteException.php Exception thrown when file cannot be written to disk. 4
FileXmlAnonTest class Drupal\Tests\file\Functional\Rest core/modules/file/tests/src/Functional/Rest/FileXmlAnonTest.php @group rest
FileXmlBasicAuthTest class Drupal\Tests\file\Functional\Rest core/modules/file/tests/src/Functional/Rest/FileXmlBasicAuthTest.php @group rest
FileXmlCookieTest class Drupal\Tests\file\Functional\Rest core/modules/file/tests/src/Functional/Rest/FileXmlCookieTest.php @group rest
Filter class Drupal\filter\Annotation core/modules/filter/src/Annotation/Filter.php Defines a filter annotation object.
Filter class Drupal\jsonapi\Query core/modules/jsonapi/src/Query/Filter.php Gathers information about the filter parameter. 3
FilterAdminTest class Drupal\Tests\filter\Functional core/modules/filter/tests/src/Functional/FilterAdminTest.php Thoroughly test the administrative interface of the filter module.
FilterAlign class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterAlign.php Provides a filter to align elements.
FilterAndArgumentUserUidTest class Drupal\Tests\comment\Kernel\Views core/modules/comment/tests/src/Kernel/Views/FilterAndArgumentUserUidTest.php Tests the user posted or commented filter and argument handlers.
FilterAPITest class Drupal\Tests\filter\Kernel core/modules/filter/tests/src/Kernel/FilterAPITest.php Tests the behavior of the API of the Filter module.
FilterAutoP class Drupal\filter\Plugin\Filter core/modules/filter/src/Plugin/Filter/FilterAutoP.php Provides a filter to convert line breaks to HTML. 1
FilterBase abstract class Drupal\filter\Plugin core/modules/filter/src/Plugin/FilterBase.php Provides a base class for Filter plugins. 22 22
FilterBooleanOperatorDefaultTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorDefaultTest.php Tests the queryOpBoolean() with default operator.
FilterBooleanOperatorDefaultTest class Drupal\views_test_data\Plugin\views\filter core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterBooleanOperatorDefaultTest.php Filter to test queryOpBoolean() with default operator.
FilterBooleanOperatorGroupTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorGroupTest.php Tests the core Drupal\views\Plugin\views\filter\BooleanOperator handler.
FilterBooleanOperatorStringTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorStringTest.php Tests core's BooleanOperatorString views filter handler.
FilterBooleanOperatorTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FilterBooleanOperatorTest.php Tests the core Drupal\views\Plugin\views\filter\BooleanOperator handler.
FilterBooleanWebTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/FilterBooleanWebTest.php Tests the boolean filter UI.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.