Classes, traits, and interfaces - 4.0.x - Examples

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
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 Verifies route paths are valid.
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\Attribute modules/plugin_type_example/src/Attribute/Sandwich.php Defines a Sandwich attribute class. 3
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
SandwichPluginManager class Drupal\plugin_type_example modules/plugin_type_example/src/SandwichPluginManager.php A plugin manager for sandwich plugins. 1 2
SelectForm class Drupal\theming_example\Form modules/theming_example/src/Form/SelectForm.php A simple form that displays a select box and submit button. 1
SessionExampleController class Drupal\session_example\Controller modules/session_example/src/Controller/SessionExampleController.php Controller for a page to display the session information.
SessionExampleForm class Drupal\session_example\Form modules/session_example/src/Form/SessionExampleForm.php Form to allow the user to store information in their session. 1
SessionExampleTest class Drupal\Tests\session_example\Functional modules/session_example/tests/src/Functional/SessionExampleTest.php Tests the basic functions of the Session Example module.
SessionHelper class Drupal\stream_wrapper_example modules/stream_wrapper_example/src/SessionHelper.php Helper to manage file wrapper data stored in the session object. 3 2
SessionHelperTest class Drupal\Tests\stream_wrapper_example\Unit modules/stream_wrapper_example/tests/src/Unit/SessionHelperTest.php PHPUnit test for the SessionHelper session manipulation class.
SessionStreamWrapper class Drupal\stream_wrapper_example\StreamWrapper modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php Example stream wrapper class to handle session:// streams. 2
SimpleForm class Drupal\form_api_example\Form modules/form_api_example/src/Form/SimpleForm.php Implements the SimpleForm form controller. 1 1
SimpleFormBlock class Drupal\form_api_example\Plugin\Block modules/form_api_example/src/Plugin/Block/SimpleFormBlock.php Provides a 'Example: Display a form' block.
SimpleFormBlockTest class Drupal\Tests\form_api_example\Functional modules/form_api_example/tests/src/Functional/SimpleFormBlockTest.php Tests \Drupal\form_api_example\Plugin\Block\SimpleFormBlock.
Simplest class Drupal\ajax_example\Form modules/ajax_example/src/Form/Simplest.php A relatively simple AJAX demonstration form. 1
SimplestTest class Drupal\Tests\ajax_example\FunctionalJavascript modules/ajax_example/tests/src/FunctionalJavascript/SimplestTest.php Test the user interactions for the Simplest example.
SimpleTextFormatter class Drupal\field_permission_example\Plugin\Field\FieldFormatter modules/field_permission_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php Plugin implementation of our "sticky-note" formatter.
SimpleTextFormatter class Drupal\field_example\Plugin\Field\FieldFormatter modules/field_example/src/Plugin/Field/FieldFormatter/SimpleTextFormatter.php Plugin implementation of the 'field_example_simple_text' formatter.
SkeletonTest class Drupal\Tests\testing_example\Functional modules/testing_example/tests/src/Functional/SkeletonTest.php Skeleton functional test.
StateDemo class Drupal\form_api_example\Form modules/form_api_example/src/Form/StateDemo.php Implements the state demo form controller. 1
StateDemoTest class Drupal\Tests\form_api_example\FunctionalJavascript modules/form_api_example/tests/src/FunctionalJavascript/StateDemoTest.php Tests the behavior of the StateDemo example.
StreamWrapperExampleController class Drupal\stream_wrapper_example\Controller modules/stream_wrapper_example/src/Controller/StreamWrapperExampleController.php Controller class for the Stream Wrapper Example.
StreamWrapperExampleTest class Drupal\Tests\stream_wrapper_example\Functional modules/stream_wrapper_example/tests/src/Functional/StreamWrapperExampleTest.php Functional tests for the stream wrapper example.
StreamWrapperTest class Drupal\Tests\stream_wrapper_example\Kernel modules/stream_wrapper_example/tests/src/Kernel/StreamWrapperTest.php Test of the Session Stream Wrapper Class.
StyleForm class Drupal\image_example\Form modules/image_example/src/Form/StyleForm.php Form for interacting with image styles. 1
SubmitDriven class Drupal\ajax_example\Form modules/ajax_example/src/Form/SubmitDriven.php Submit a form without a page reload. 1
SubmitDrivenTest class Drupal\Tests\ajax_example\FunctionalJavascript modules/ajax_example/tests/src/FunctionalJavascript/SubmitDrivenTest.php Tests the behavior of the submit-driven AJAX example.
TableDragExampleController class Drupal\tabledrag_example\Controller modules/tabledrag_example/src/Controller/TableDragExampleController.php Controller for the tabledrag example.
TableDragExampleNestedForm class Drupal\tabledrag_example\Form modules/tabledrag_example/src/Form/TableDragExampleNestedForm.php Table drag example nested form. 1
TableDragExampleResetForm class Drupal\tabledrag_example\Form modules/tabledrag_example/src/Form/TableDragExampleResetForm.php Table drag example reset form. 1
TableDragExampleRootLeafForm class Drupal\tabledrag_example\Form modules/tabledrag_example/src/Form/TableDragExampleRootLeafForm.php Example form with a table with draggable items. 1
TableDragExampleSimpleForm class Drupal\tabledrag_example\Form modules/tabledrag_example/src/Form/TableDragExampleSimpleForm.php Table drag example simple form. 1
TabledragMenuTest class Drupal\Tests\tabledrag_example\Functional modules/tabledrag_example/tests/src/Functional/TabledragMenuTest.php Verify functionalities of tabledrag_example.
TableSortExampleController class Drupal\tablesort_example\Controller modules/tablesort_example/src/Controller/TableSortExampleController.php Controller routines for tablesort example routes.
TableSortExampleTest class Drupal\Tests\tablesort_example\Functional modules/tablesort_example/tests/src/Functional/TableSortExampleTest.php Verify the tablesort functionality.
TestingExampleController class Drupal\testing_example\Controller modules/testing_example/src/Controller/TestingExampleController.php Controller for testing_example module.
TestingExampleMenuTest class Drupal\Tests\testing_example\Functional modules/testing_example/tests/src/Functional/TestingExampleMenuTest.php Test the user-facing menus in Testing Example.