Classes, traits, and interfaces - 10.3.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
NoMultilingualReviewPageTest class Drupal\Tests\forum\Functional\migrate_drupal\d6 core/modules/forum/tests/src/Functional/migrate_drupal/d6/NoMultilingualReviewPageTest.php Tests migrate upgrade review page.
NoMultilingualReviewPageTest class Drupal\Tests\forum\Functional\migrate_drupal\d7 core/modules/forum/tests/src/Functional/migrate_drupal/d7/NoMultilingualReviewPageTest.php Tests Drupal 7 upgrade without translations.
NoMultilingualReviewPageTest class Drupal\Tests\statistics\Functional\migrate_drupal\d6 core/modules/statistics/tests/src/Functional/migrate_drupal/d6/NoMultilingualReviewPageTest.php Tests migrate upgrade review page.
NoMultilingualReviewPageTest class Drupal\Tests\statistics\Functional\migrate_drupal\d7 core/modules/statistics/tests/src/Functional/migrate_drupal/d7/NoMultilingualReviewPageTest.php Tests Drupal 7 upgrade without translations.
NoMultilingualReviewPageTest class Drupal\Tests\migrate_drupal_ui\Functional\d6 core/modules/migrate_drupal_ui/tests/src/Functional/d6/NoMultilingualReviewPageTest.php Tests migrate upgrade review page for Drupal 6 without translations.
NoMultilingualReviewPageTest class Drupal\Tests\migrate_drupal_ui\Functional\d7 core/modules/migrate_drupal_ui/tests/src/Functional/d7/NoMultilingualReviewPageTest.php Tests Drupal 7 upgrade without translations.
NoMultilingualReviewPageTestBase abstract class Drupal\Tests\migrate_drupal_ui\Functional core/modules/migrate_drupal_ui/tests/src/Functional/NoMultilingualReviewPageTestBase.php Tests the upgrade review form without translations. 9 9
NonAbstractFormStateDecoratorBase class Drupal\Tests\Core\Form core/tests/Drupal/Tests/Core/Form/FormStateDecoratorBaseTest.php Provides a non-abstract version of the class under test.
NonAnnotatedClass class Drupal\plugin_test\Plugin\plugin_test\fruit core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/NonAnnotatedClass.php
NonDefaultBlockAdminTest class Drupal\Tests\block\Functional core/modules/block/tests/src/Functional/NonDefaultBlockAdminTest.php Tests the block administration page for a non-default theme.
None class Drupal\views\Plugin\views\pager core/modules/views/src/Plugin/views/pager/None.php Plugin for views without pagers. 1
None class Drupal\views\Plugin\views\argument_validator core/modules/views/src/Plugin/views/argument_validator/None.php Do not validate the argument.
None class Drupal\views\Plugin\views\cache core/modules/views/src/Plugin/views/cache/None.php Caching plugin that provides no caching at all. 1
None class Drupal\views\Plugin\views\access core/modules/views/src/Plugin/views/access/None.php Access plugin that provides no access control at all.
Nonexistent final class Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Attribute core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Attribute/Nonexistent.php #[NonexistentAttribute]
NonInheritingBundleClass class Drupal\entity_test_bundle_class\Entity core/modules/system/tests/modules/entity_test_bundle_class/src/Entity/NonInheritingBundleClass.php An invalid bundle class which does not inherit the main entity class. 1
NonPrintable class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php
NonPublicSchemaTest class Drupal\Tests\pgsql\Kernel\pgsql core/modules/pgsql/tests/src/Kernel/pgsql/NonPublicSchemaTest.php Tests schema API for non-public schema for the PostgreSQL driver.
NonStableModulesTest class Drupal\Tests\system\Functional\Module core/modules/system/tests/src/Functional/Module/NonStableModulesTest.php Tests the installation of deprecated and experimental modules.
NoOptimizeCacheContext class Drupal\Tests\Core\Cache\Context core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php Non-optimizable context class.
NoPreExistingSchemaUpdateTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php Tries to update a module which has no pre-existing schema.
NoProfilesException class Drupal\Core\Installer\Exception core/lib/Drupal/Core/Installer/Exception/NoProfilesException.php Exception thrown if no installation profiles are available. 1
NormalInstallerServiceProvider class Drupal\Core\Installer core/lib/Drupal/Core/Installer/NormalInstallerServiceProvider.php Service provider for the installer environment. 1
NormalizerBase abstract class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/NormalizerBase.php Base class for Normalizers. 12 5
NormalizerBase abstract class Drupal\jsonapi\Normalizer core/modules/jsonapi/src/Normalizer/NormalizerBase.php Base normalizer used in all JSON:API normalizers. 10
NormalizerBaseTest class Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php @coversDefaultClass \Drupal\serialization\Normalizer\NormalizerBase[[api-linebreak]] @group serialization
NormalizerTestBase abstract class Drupal\Tests\serialization\Kernel core/modules/serialization/tests/src/Kernel/NormalizerTestBase.php Helper base class to set up some test fields for serialization testing. 2
NoSerializationClassTestResource class Drupal\rest_test\Plugin\rest\resource core/modules/rest/tests/modules/rest_test/src/Plugin/rest/resource/NoSerializationClassTestResource.php Class used to test that serialization_class is optional.
NoServerError class Drupal\Core\PageCache\ResponsePolicy core/lib/Drupal/Core/PageCache/ResponsePolicy/NoServerError.php A policy denying caching of a server error (HTTP 5xx) responses. 2
NoSessionOpen class Drupal\Core\PageCache\RequestPolicy core/lib/Drupal/Core/PageCache/RequestPolicy/NoSessionOpen.php A policy allowing delivery of cached pages when there is no session open. 2
NoSessionOpenTest class Drupal\Tests\Core\PageCache core/tests/Drupal/Tests/Core/PageCache/NoSessionOpenTest.php @coversDefaultClass \Drupal\Core\PageCache\RequestPolicy\NoSessionOpen[[api-linebreak]] @group PageCache
NoSourceModule class Drupal\migration_provider_test\Plugin\migrate\source core/modules/migrate_drupal_ui/tests/modules/migration_provider_test/src/Plugin/migrate/source/NoSourceModule.php A test source plugin without a source_module.
NoSourcePluginDecorator class Drupal\migrate\Plugin core/modules/migrate/src/Plugin/NoSourcePluginDecorator.php Remove definitions which refer to a non-existing source plugin.
NotNullConstraint class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php NotNull constraint. 1
NotNullConstraintValidator class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraintValidator.php NotNull constraint validator.
NotRegularDirectoryException class Drupal\Core\File\Exception core/lib/Drupal/Core/File/Exception/NotRegularDirectoryException.php Exception thrown when a target is not a regular directory (e.g. a file). 1
NotRegularFileException class Drupal\Core\File\Exception core/lib/Drupal/Core/File/Exception/NotRegularFileException.php Exception thrown when a target is not a regular file (e.g. a directory). 2
NoType class Drupal\action_test\Plugin\Action core/modules/system/tests/modules/action_test/src/Plugin/Action/NoType.php Provides an operation with no type specified.
NoUniqueFieldException class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/NoUniqueFieldException.php Exception thrown if an upsert query doesn't specify a unique field.
NullArgument class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/NullArgument.php Argument handler that ignores the argument.
NullBackend class Drupal\Core\Cache core/lib/Drupal/Core/Cache/NullBackend.php Defines a stub cache implementation. 1 16
NullBackendFactory class Drupal\Core\Cache core/lib/Drupal/Core/Cache/NullBackendFactory.php 1 4
NullBackendTest class Drupal\Tests\Core\Cache core/tests/Drupal/Tests/Core/Cache/NullBackendTest.php Tests the cache NullBackend.
NullCoalesce class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/NullCoalesce.php Provides a Null Coalesce process plugin. 1
NullCoalesceTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php Tests the null_coalesce process plugin.
NullDefaultFormTest class Drupal\Tests\contact\Functional\Update core/modules/contact/tests/src/Functional/Update/NullDefaultFormTest.php Tests the upgrade path for making 'default_form' in 'contact.settings' config to NULL.
NullDescriptionTest class Drupal\Tests\taxonomy\Functional\Update core/modules/taxonomy/tests/src/Functional/Update/NullDescriptionTest.php Tests the upgrade path for making vocabularies' description NULL.
NullDestination class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/NullDestination.php Provides null destination plugin.
NullFileCache class Drupal\Component\FileCache core/lib/Drupal/Component/FileCache/NullFileCache.php Null implementation for the file cache. 1
NullGenerator class Drupal\Core\Routing core/lib/Drupal/Core/Routing/NullGenerator.php No-op implementation of a URL Generator, needed for backward compatibility.

Other projects


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