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
Nid class Drupal\node\Plugin\views\argument core/modules/node/src/Plugin/views/argument/Nid.php Argument handler to accept a node id.
NidArgumentTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/NidArgumentTest.php Tests the nid argument handler.
NoBigPipeRouteAlterSubscriber class Drupal\big_pipe\EventSubscriber core/modules/big_pipe/src/EventSubscriber/NoBigPipeRouteAlterSubscriber.php Sets the '_no_big_pipe' option on select routes. 2
NoCheckpointsException final class Drupal\Core\Config\Checkpoint core/lib/Drupal/Core/Config/Checkpoint/NoCheckpointsException.php Thrown when using the checkpoint storage with no checkpoints.
NoCorrespondingEntityClassException class Drupal\Core\Entity\Exception core/lib/Drupal/Core/Entity/Exception/NoCorrespondingEntityClassException.php Exception thrown if an entity type is not represented by a class. 2
Node class Drupal\node\Entity core/modules/node/src/Entity/Node.php Defines the node entity class. 199
Node class Drupal\node\Plugin\views\field core/modules/node/src/Plugin/views/field/Node.php Field handler to provide simple renderer that allows linking to a node. 1 1
Node class Drupal\node\Plugin\views\wizard core/modules/node/src/Plugin/views/wizard/Node.php Tests creating node views with the wizard.
Node class Drupal\node\Plugin\views\argument_default core/modules/node/src/Plugin/views/argument_default/Node.php Default argument plugin to extract a node. 1 1
Node class Drupal\node\Plugin\migrate\source\d6 core/modules/node/src/Plugin/migrate/source/d6/Node.php Drupal 6 node source from database. 1
Node class Drupal\node\Plugin\migrate\source\d7 core/modules/node/src/Plugin/migrate/source/d7/Node.php Drupal 7 node source from database. 1
NodeAccessBaseTableTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php Tests behavior of the node access subsystem if the base table is not node.
NodeAccessCacheabilityTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php Tests the node access automatic cacheability bubbling logic.
NodeAccessCacheabilityWithNodeGrants class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessCacheabilityWithNodeGrants.php Tests node view access cacheability with node grants.
NodeAccessControlHandler class Drupal\node core/modules/node/src/NodeAccessControlHandler.php Defines the access control handler for the node entity type. 1
NodeAccessControlHandlerInterface interface Drupal\node core/modules/node/src/NodeAccessControlHandlerInterface.php Node specific entity access control methods. 1
NodeAccessFieldTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessFieldTest.php Tests the interaction of the node access system with fields.
NodeAccessGrantsCacheContext class Drupal\node\Cache core/modules/node/src/Cache/NodeAccessGrantsCacheContext.php Defines the node access view cache context service. 2
NodeAccessGrantsCacheContextTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessGrantsCacheContextTest.php Tests the node access grants cache context service.
NodeAccessJoinTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessJoinTest.php Tests Node Access on join.
NodeAccessLanguageAwareCombinationTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareCombinationTest.php Tests node access with multiple languages and two node access modules.
NodeAccessLanguageAwareTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessLanguageAwareTest.php Tests multilingual node access with a language-aware module.
NodeAccessLanguageFallbackTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessLanguageFallbackTest.php Tests that the node_access system stores the proper fallback marker.
NodeAccessLanguageTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessLanguageTest.php Tests multilingual node access with a module that is not language-aware.
NodeAccessMenuLinkTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessMenuLinkTest.php Tests the interaction of the node access system with menu links.
NodeAccessPagerTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessPagerTest.php Tests access controlled node views have the right amount of comment pages.
NodeAccessPagerTest class Drupal\Tests\forum\Functional core/modules/forum/tests/src/Functional/NodeAccessPagerTest.php Tests access controlled node views have the right amount of comment pages.
NodeAccessRebuildNodeGrantsTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAccessRebuildNodeGrantsTest.php Tests node access rebuild functions with multiple node access modules.
NodeAccessRecordsTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessRecordsTest.php Tests hook_node_access_records when acquiring grants.
NodeAccessTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessTest.php Tests basic node_access functionality.
NodeAccessTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/NodeAccessTest.php Tests with node access enabled.
NodeAccessTest class Drupal\Tests\content_moderation\Functional core/modules/content_moderation/tests/src/Functional/NodeAccessTest.php Tests permission access control around nodes.
NodeAccessTestAutoBubblingController class Drupal\node_access_test_auto_bubbling\Controller core/modules/node/tests/node_access_test_auto_bubbling/src/Controller/NodeAccessTestAutoBubblingController.php Returns a node ID listing.
NodeAccessTestBase abstract class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeAccessTestBase.php Defines a base class for node access kernel tests. 6
NodeActionsConfigurationTest class Drupal\Tests\action\Functional\Node core/modules/action/tests/src/Functional/Node/NodeActionsConfigurationTest.php Tests configuration of actions provided by the Node module.
NodeAdminRouteSubscriber class Drupal\node\EventSubscriber core/modules/node/src/EventSubscriber/NodeAdminRouteSubscriber.php Sets the _admin_route for specific node-related routes. 2
NodeAdminTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeAdminTest.php Tests node administration page functionality.
NodeBlockFunctionalTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php Tests node block functionality.
NodeBodyFieldStorageTest class Drupal\Tests\node\Kernel core/modules/node/tests/src/Kernel/NodeBodyFieldStorageTest.php Tests node body field storage.
NodeBulkForm class Drupal\node\Plugin\views\field core/modules/node/src/Plugin/views/field/NodeBulkForm.php Defines a node operations bulk form element. 1
NodeBulkFormTest class Drupal\Tests\node\Unit\Plugin\views\field core/modules/node/tests/src/Unit/Plugin/views/field/NodeBulkFormTest.php @coversDefaultClass \Drupal\node\Plugin\views\field\NodeBulkForm[[api-linebreak]] @group node
NodeByNodeTypeTest class Drupal\Tests\node\Kernel\Plugin\migrate\source\d6 core/modules/node/tests/src/Kernel/Plugin/migrate/source/d6/NodeByNodeTypeTest.php Tests D6 node source plugin with 'node_type' configuration.
NodeCacheTagsTest class Drupal\Tests\node\Functional core/modules/node/tests/src/Functional/NodeCacheTagsTest.php Tests the Node entity's cache tags.
NodeClassicTest class Drupal\Tests\migrate_drupal_ui\Functional\d6 core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php Tests the classic node migration runs.
NodeComment class Drupal\comment\Plugin\views\filter core/modules/comment/src/Plugin/views/filter/NodeComment.php Filter based on comment node status.
NodeCommentsTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/NodeCommentsTest.php Tests comments on nodes.
NodeComplete class Drupal\node\Plugin\migrate\source\d6 core/modules/node/src/Plugin/migrate/source/d6/NodeComplete.php Drupal 6 all node revisions source, including translation revisions.
NodeComplete class Drupal\node\Plugin\migrate\source\d7 core/modules/node/src/Plugin/migrate/source/d7/NodeComplete.php Drupal 7 all node revisions source, including translation revisions.
NodeCompleteNodeLookup class Drupal\migrate_drupal\Plugin\migrate\process core/modules/migrate_drupal/src/Plugin/migrate/process/NodeCompleteNodeLookup.php Returns only the nid from migration_lookup on node_complete migration.
NodeCompleteNodeRevisionLookup class Drupal\migrate_drupal\Plugin\migrate\process core/modules/migrate_drupal/src/Plugin/migrate/process/NodeCompleteNodeRevisionLookup.php Returns only the vid from migration_lookup on node_complete migration.

Other projects


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