Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
GeneratedUrl class Drupal\Core core/lib/Drupal/Core/GeneratedUrl.php Used to return generated URLs, along with associated bubbleable metadata. 25
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. 3
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. 1
GenerateThemeTest class Drupal\BuildTests\Command core/tests/Drupal/BuildTests/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. 8
GenericFileFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/GenericFileFormatter.php Plugin implementation of the 'file_default' formatter.
GenericModuleTestBase abstract class Drupal\Tests\system\Functional\Module core/modules/system/tests/src/Functional/Module/GenericModuleTestBase.php Runs a series of generic tests for one module. 74 74
GenericRecipeTestBase abstract class Drupal\Tests\system\Functional\Recipe core/modules/system/tests/src/Functional/Recipe/GenericRecipeTestBase.php Runs a series of generic tests for one recipe. 27 27
GenericTest class Drupal\Tests\system\Functional core/modules/system/tests/src/Functional/GenericTest.php Generic module test for system.
GenericTest class Drupal\Tests\filter\Functional core/modules/filter/tests/src/Functional/GenericTest.php Generic module test for filter.
GenericTest class Drupal\Tests\serialization\Functional core/modules/serialization/tests/src/Functional/GenericTest.php Generic module test for serialization.
GenericTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/GenericTest.php Generic module test for views.
GenericTest class Drupal\Tests\link\Functional core/modules/link/tests/src/Functional/GenericTest.php Generic module test for link.
GenericTest class Drupal\Tests\rest\Functional core/modules/rest/tests/src/Functional/GenericTest.php Generic module test for rest.
GenericTest class Drupal\Tests\inline_form_errors\Functional core/modules/inline_form_errors/tests/src/Functional/GenericTest.php Generic module test for inline_form_errors.
GenericTest class Drupal\Tests\content_translation\Functional core/modules/content_translation/tests/src/Functional/GenericTest.php Generic module test for content_translation.
GenericTest class Drupal\Tests\datetime_range\Functional core/modules/datetime_range/tests/src/Functional/GenericTest.php Generic module test for datetime_range.
GenericTest class Drupal\Tests\layout_discovery\Functional core/modules/layout_discovery/tests/src/Functional/GenericTest.php Generic module test for layout_discovery.
GenericTest class Drupal\Tests\text\Functional core/modules/text/tests/src/Functional/GenericTest.php Generic module test for text.
GenericTest class Drupal\Tests\block_content\Functional core/modules/block_content/tests/src/Functional/GenericTest.php Generic module test for block_content.
GenericTest class Drupal\Tests\automated_cron\Functional core/modules/automated_cron/tests/src/Functional/GenericTest.php Generic module test for automated_cron.
GenericTest class Drupal\Tests\path\Functional core/modules/path/tests/src/Functional/GenericTest.php Generic module test for path.
GenericTest class Drupal\Tests\datetime\Functional core/modules/datetime/tests/src/Functional/GenericTest.php Generic module test for datetime.
GenericTest class Drupal\Tests\migrate_drupal_ui\Functional core/modules/migrate_drupal_ui/tests/src/Functional/GenericTest.php Generic module test for migrate_drupal_ui.
GenericTest class Drupal\Tests\image\Functional core/modules/image/tests/src/Functional/GenericTest.php Generic module test for image.
GenericTest class Drupal\Tests\basic_auth\Functional core/modules/basic_auth/tests/src/Functional/GenericTest.php Generic module test for basic_auth.
GenericTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/GenericTest.php Generic module test for update.
GenericTest class Drupal\Tests\toolbar\Functional core/modules/toolbar/tests/src/Functional/GenericTest.php Generic module test for toolbar.
GenericTest class Drupal\Tests\workflows\Functional core/modules/workflows/tests/src/Functional/GenericTest.php Generic module test for workflows.
GenericTest class Drupal\Tests\ban\Functional core/modules/ban/tests/src/Functional/GenericTest.php Generic module test for ban.
GenericTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/GenericTest.php Generic module test for field_ui.
GenericTest class Drupal\Tests\syslog\Functional core/modules/syslog/tests/src/Functional/GenericTest.php Generic module test for syslog.
GenericTest class Drupal\Tests\announcements_feed\Functional core/modules/announcements_feed/tests/src/Functional/GenericTest.php Generic module test for announcements_feed.
GenericTest class Drupal\Tests\help\Functional core/modules/help/tests/src/Functional/GenericTest.php Generic module test for help.
GenericTest class Drupal\Tests\migrate\Functional core/modules/migrate/tests/src/Functional/GenericTest.php Generic module test for migrate.
GenericTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/GenericTest.php Generic module test for user.
GenericTest class Drupal\Tests\mysqli\Functional core/modules/mysqli/tests/src/Functional/GenericTest.php Generic module test for mysqli.
GenericTest class Drupal\Tests\phpass\Functional core/modules/phpass/tests/src/Functional/GenericTest.php Generic module test for phpass.
GenericTest class Drupal\FunctionalTests\Recipe\Core\content_search core/recipes/content_search/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\basic_shortcuts core/recipes/basic_shortcuts/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\page_content_type core/recipes/page_content_type/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\basic_html_format_editor core/recipes/basic_html_format_editor/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\core_recommended_performance core/recipes/core_recommended_performance/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\administrator_role core/recipes/administrator_role/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\remote_video_media_type core/recipes/remote_video_media_type/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\article_tags core/recipes/article_tags/tests/src/Functional/GenericTest.php Tests Generic.
GenericTest class Drupal\FunctionalTests\Recipe\Core\content_editor_role core/recipes/content_editor_role/tests/src/Functional/GenericTest.php Tests Generic.

Other projects


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