Classes, traits, and interfaces - 3.x - examples

Primary tabs

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
MultistepFormTest class Drupal\Tests\form_api_example\Functional modules/form_api_example/tests/src/Functional/MultistepFormTest.php Tests the Multistep FAPI Example.
NodeTypeExampleController class Drupal\node_type_example\Controller modules/node_type_example/src/Controller/NodeTypeExampleController.php Controller routines for node_type_example.
NodeTypeExampleTest class Drupal\Tests\node_type_example\Functional modules/node_type_example/tests/src/Functional/NodeTypeExampleTest.php Test that our content types are successfully created.
Page class Drupal\form_api_example\Controller modules/form_api_example/src/Controller/Page.php Simple page controller for drupal.
PageExampleController class Drupal\page_example\Controller modules/page_example/src/Controller/PageExampleController.php Controller routines for page example routes.
PageExampleTest class Drupal\Tests\page_example\Functional modules/page_example/tests/src/Functional/PageExampleTest.php Creates page and render the content based on the arguments passed in the URL.
PagerExamplePage class Drupal\pager_example\Controller modules/pager_example/src/Controller/PagerExamplePage.php Controller for pager_example.page route.
PagerExampleTest class Drupal\Tests\pager_example\Functional modules/pager_example/tests/src/Functional/PagerExampleTest.php Tests paging.
PathProcessorSessions class Drupal\stream_wrapper_example\PathProcessor modules/stream_wrapper_example/src/PathProcessor/PathProcessorSessions.php Defines a path processor to rewrite file URLs. 2
PHPUnitExampleController class Drupal\phpunit_example\Controller modules/phpunit_example/src/Controller/PHPUnitExampleController.php Controller for PHPUnit description page.
PHPUnitExampleMenuTest class Drupal\Tests\phpunit_example\Functional modules/phpunit_example/tests/src/Functional/PHPUnitExampleMenuTest.php Test the user-facing menus in PHPUnit Example.
PluginTypeExampleController class Drupal\plugin_type_example\Controller modules/plugin_type_example/src/Controller/PluginTypeExampleController.php Controller for our example pages.
PluginTypeExampleTest class Drupal\Tests\plugin_type_example\Functional modules/plugin_type_example/tests/src/Functional/PluginTypeExampleTest.php Test the functionality of the Plugin Type Example module.
ProtectedPrivates class Drupal\phpunit_example modules/phpunit_example/src/ProtectedPrivates.php A class with features to show how to do unit testing. 1 2
ProtectedPrivatesSubclass class Drupal\Tests\phpunit_example\Unit\Subclasses modules/phpunit_example/tests/src/Unit/Subclasses/ProtectedPrivatesSubclass.php A class for testing ProtectedPrivate::protectedAdd(). 1
ProtectedPrivatesTest class Drupal\Tests\phpunit_example\Unit modules/phpunit_example/tests/src/Unit/ProtectedPrivatesTest.php ProtectedPrivates unit testing of restricted methods.
QueueExampleForm class Drupal\queue_example\Form modules/queue_example/src/Form/QueueExampleForm.php Form with examples on how to use queue. 1
QueueExampleTest class Drupal\Tests\queue_example\Functional modules/queue_example/tests/src/Functional/QueueExampleTest.php Tests that our queue_example functions properly.
RenderExampleController class Drupal\render_example\Controller modules/render_example/src/Controller/RenderExampleController.php Provides module description page and examples of building render arrays.
RenderExampleDemoForm class Drupal\render_example\Form modules/render_example/src/Form/RenderExampleDemoForm.php Provides the form for toggling module features on and off. 1
RenderExampleMenuTest class Drupal\Tests\render_example\Functional modules/render_example/tests/src/Functional/RenderExampleMenuTest.php Test the user-facing menus in Render Example.
RenderExampleTest class Drupal\Tests\render_example\Functional modules/render_example/tests/src/Functional/RenderExampleTest.php Test the render example functionality.
ReportWorkerBase abstract class Drupal\cron_example\Plugin\QueueWorker modules/cron_example/src/Plugin/QueueWorker/ReportWorkerBase.php Provides base functionality for the ReportWorkers. 2
ReportWorkerOne class Drupal\cron_example\Plugin\QueueWorker modules/cron_example/src/Plugin/QueueWorker/ReportWorkerOne.php A report worker.
ReportWorkerTwo class Drupal\cron_example\Plugin\QueueWorker modules/cron_example/src/Plugin/QueueWorker/ReportWorkerTwo.php A report worker.
RestExampleActionTest class Drupal\Tests\rest_example\Funtional modules/rest_example/tests/src/Functional/RestExampleActionTest.php Verify that the Views are accessible.
RestExampleClientCalls class Drupal\rest_example modules/rest_example/src/RestExampleClientCalls.php Here we interact with the remote service. 3 2
RestExampleClientController class Drupal\rest_example\Controller modules/rest_example/src/Controller/RestExampleClientController.php Controller routines for rest example routes.
RestExampleClientDelete class Drupal\rest_example\Form modules/rest_example/src/Form/RestExampleClientDelete.php Delete a new node on a remote Drupal site. 1
RestExampleClientEdit class Drupal\rest_example\Form modules/rest_example/src/Form/RestExampleClientEdit.php Edit or create a new node on a remote Drupal site. 1
RestExampleClientSettings class Drupal\rest_example\Form modules/rest_example/src/Form/RestExampleClientSettings.php Setup form for a Drupal REST client. 1
RestExampleHelpController class Drupal\rest_example\Controller modules/rest_example/src/Controller/RestExampleHelpController.php Provides a help page for the REST Examples module.
RestExampleMenuTest class Drupal\Tests\rest_example\Funtional modules/rest_example/tests/src/Functional/RestExampleMenuTest.php Test the user-facing menus in Rest Example.
RestExampleSettingsTest class Drupal\Tests\rest_example\Funtional modules/rest_example/tests/src/Functional/RestExampleSettingsTest.php Test the settings in Rest Example.
RgbItem class Drupal\field_example\Plugin\Field\FieldType modules/field_example/src/Plugin/Field/FieldType/RgbItem.php Plugin implementation of the 'field_example_rgb' field type.
Robot class Drupal\config_entity_example\Entity modules/config_entity_example/src/Entity/Robot.php Defines the robot entity. 2
RobotAccessController class Drupal\config_entity_example modules/config_entity_example/src/RobotAccessController.php Defines an access controller for the robot entity.
RobotAddForm class Drupal\config_entity_example\Form modules/config_entity_example/src/Form/RobotAddForm.php Class RobotAddForm.
RobotDeleteForm class Drupal\config_entity_example\Form modules/config_entity_example/src/Form/RobotDeleteForm.php Class RobotDeleteForm.
RobotEditForm class Drupal\config_entity_example\Form modules/config_entity_example/src/Form/RobotEditForm.php Class RobotEditForm.
RobotFormBase class Drupal\config_entity_example\Form modules/config_entity_example/src/Form/RobotFormBase.php Class RobotFormBase. 2
RobotListBuilder class Drupal\config_entity_example\Controller modules/config_entity_example/src/Controller/RobotListBuilder.php Provides a listing of robot entities.
RobotReferenceTest class Drupal\Tests\config_entity_example\Functional modules/config_entity_example/tests/src/Functional/RobotReferenceTest.php Ensure Robot entities can be used in entity_reference fields.
RoleAccessCheck class Drupal\menu_example\Access modules/menu_example/src/Access/RoleAccessCheck.php Determines access to routes based on roles. 2
RoutePathTest class Drupal\Tests\examples\Unit tests/src/Unit/RoutePathTest.php Validate paths for routes.
RouteSubscriber class Drupal\menu_example\Routing modules/menu_example/src/Routing/RouteSubscriber.php Listens to the dynamic route events. 2
SampleExampleController class Drupal\examples_description_test\Controller tests/modules/examples_description_test/src/Controller/SampleExampleController.php Simple controller class used to test the DescriptionTemplateTrait. 1
Sandwich class Drupal\plugin_type_example\Annotation modules/plugin_type_example/src/Annotation/Sandwich.php Defines a Sandwich annotation object. 1
SandwichBase abstract class Drupal\plugin_type_example modules/plugin_type_example/src/SandwichBase.php A base class to help developers implement their own sandwich plugins. 2 2
SandwichInterface interface Drupal\plugin_type_example modules/plugin_type_example/src/SandwichInterface.php An interface for all Sandwich type plugins. 1

Other projects