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
ForumVocabulary class Drupal\taxonomy\Plugin\migrate\process core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php Checks if the vocabulary being migrated is the one used for forums.
FrameworkTest class Drupal\Tests\system\FunctionalJavascript core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php Tests the off-canvas dialog functionality.
FrameworkTest class Drupal\Tests\system\Functional\Ajax core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php Performs tests on AJAX framework functions.
FrontMatter class Drupal\Component\FrontMatter core/lib/Drupal/Component/FrontMatter/FrontMatter.php Component for parsing front matter from a source. 5
FrontMatterParseException class Drupal\Component\FrontMatter\Exception core/lib/Drupal/Component/FrontMatter/Exception/FrontMatterParseException.php Defines a class for front matter parsing exceptions. 3
FrontMatterTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/FrontMatterTest.php Tests Twig front matter support.
FrontMatterTest class Drupal\Tests\Component\FrontMatter core/tests/Drupal/Tests/Component/FrontMatter/FrontMatterTest.php Tests front matter parsing helper methods. 1
FrontPageTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/FrontPageTest.php Tests the default frontpage provided by views.
FrontPageTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/FrontPageTest.php Tests front page functionality and administration.
FruitInterface interface Drupal\plugin_test\Plugin\plugin_test\fruit core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/FruitInterface.php Provides an interface for test plugins. 4
FTP abstract class Drupal\Core\FileTransfer core/lib/Drupal/Core/FileTransfer/FTP.php Defines the base class for FTP implementations. 1
FTPExtension class Drupal\Core\FileTransfer core/lib/Drupal/Core/FileTransfer/FTPExtension.php Defines a file transfer class using the PHP FTP extension.
Full class Drupal\views\Plugin\views\pager core/modules/views/src/Plugin/views/pager/Full.php The plugin to handle full pager.
FullDate class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/FullDate.php Argument handler for a full date (CCYYMMDD)
FullDate class Drupal\datetime\Plugin\views\argument core/modules/datetime/src/Plugin/views/argument/FullDate.php Argument handler for a full date (CCYYMMDD).
FunctionalJavascriptTestSuite class Drupal\Tests\TestSuites core/tests/TestSuites/FunctionalJavascriptTestSuite.php Discovers tests for the functional-javascript test suite.
FunctionalTestSetupTrait trait Drupal\Core\Test core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php Defines a trait for shared functional test setup functionality. 2
FunctionalTestSuite class Drupal\Tests\TestSuites core/tests/TestSuites/FunctionalTestSuite.php Discovers tests for the functional test suite.
FunctionsTest class Drupal\Tests\system\Kernel\Theme core/modules/system/tests/src/Kernel/Theme/FunctionsTest.php Tests for common theme functions.
FundamentalCompatibilityConstraint class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/FundamentalCompatibilityConstraint.php The fundamental compatibility constraint.
FundamentalCompatibilityConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/FundamentalCompatibilityConstraintValidator.php Validates fundamental compatibility of CKEditor 5 with the given text format.
GarbageCollectionTest class Drupal\KernelTests\Core\KeyValueStore core/tests/Drupal/KernelTests/Core/KeyValueStore/GarbageCollectionTest.php Tests garbage collection for the expirable key-value database storage.
GDImageToolkitOperationBase abstract class Drupal\system\Plugin\ImageToolkit\Operation\gd core/modules/system/src/Plugin/ImageToolkit/Operation/gd/GDImageToolkitOperationBase.php 7
GDToolkit class Drupal\system\Plugin\ImageToolkit core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php Defines the GD2 toolkit for image manipulation within Drupal.
GenerateAutoloadReferenceFile final class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php Generates an 'autoload.php' that includes the autoloader created by Composer.
GeneratedButton class Drupal\Core core/lib/Drupal/Core/GeneratedButton.php This class holds a <button> generated from the <button> route. 2
GeneratedLink class Drupal\Core core/lib/Drupal/Core/GeneratedLink.php Used to return generated links, along with associated cacheability metadata. 2 4
GeneratedNoLink class Drupal\Core core/lib/Drupal/Core/GeneratedNoLink.php This class holds a <span> generated from the <nolink> route. 2
GeneratedUrl class Drupal\Core core/lib/Drupal/Core/GeneratedUrl.php Used to return generated URLs, along with associated bubbleable metadata. 14
GeneratePermutationsTrait trait Drupal\Tests\Traits\Core core/tests/Drupal/Tests/Traits/Core/GeneratePermutationsTrait.php Adds ability to convert a list of parameters into a stack of permutations. 4
GenerateProxyClassApplication class Drupal\Core\Command core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php Provides a console command to generate proxy classes. 1
GenerateProxyClassCommand class Drupal\Core\Command core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php Provides a console command to generate proxy classes.
GenerateTheme class Drupal\Core\Command core/lib/Drupal/Core/Command/GenerateTheme.php Generates a new theme based on latest default markup.
GenerateThemeTest class Drupal\Tests\Core\Command core/tests/Drupal/Tests/Core/Command/GenerateThemeTest.php Tests the generate-theme commands.
GeneratorNotInitializedException class Drupal\Core\Routing core/lib/Drupal/Core/Routing/GeneratorNotInitializedException.php Class for exceptions thrown when the generator has not been initialized.
GenericCacheBackendUnitTestBase abstract class Drupal\KernelTests\Core\Cache core/tests/Drupal/KernelTests/Core/Cache/GenericCacheBackendUnitTestBase.php Tests any cache backend. 6
GenericFileFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/GenericFileFormatter.php Plugin implementation of the 'file_default' formatter.
Get class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/Get.php Gets the source value. 2
GetFilenameTest class Drupal\KernelTests\Core\Bootstrap core/tests/Drupal/KernelTests/Core/Bootstrap/GetFilenameTest.php Tests that drupal_get_filename() works correctly.
GetRdfNamespacesTest class Drupal\Tests\rdf\Functional core/modules/rdf/tests/src/Functional/GetRdfNamespacesTest.php Tests hook_rdf_namespaces().
GetTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/GetTest.php Tests the get process plugin.
GetTestMethodCallerExtendsTest class Drupal\FunctionalTests core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php Test for BrowserTestBase::getTestMethodCaller() in child classes.
GetTestMethodCallerTest class Drupal\FunctionalTests core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php Explicit test for BrowserTestBase::getTestMethodCaller(). 1
Gettext class Drupal\locale core/modules/locale/src/Gettext.php Static class providing Drupal specific Gettext functionality. 1
GetUntransformedTextCommand class Drupal\quickedit\Ajax core/modules/quickedit/src/Ajax/GetUntransformedTextCommand.php AJAX command to rerender formatted text field without transformation filters. 1
GetUntransformedTextCommand

in drupal:9.5.0 and is removed from drupal:10.0.0. There is no replacement.

class Drupal\editor\Ajax core/modules/editor/src/Ajax/GetUntransformedTextCommand.php Rerenders a formatted text field without any transformation filters. 1
Git class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/Git.php Provide some Git utility operations.
GlobalAttribute class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/GlobalAttribute.php CKEditor 5 Global Attribute for filter_html. 1
GlossaryStatusFilterTest class Drupal\Tests\views\Functional\Update core/modules/views/tests/src/Functional/Update/GlossaryStatusFilterTest.php Tests that the status filter is added to the glossary view.
GlossaryTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/GlossaryTest.php Tests glossary functionality of views.

Other projects


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