Examples
Same name in other branches
- 7.x-1.x examples.module \examples
- 4.0.x examples.module \examples
Well-documented API examples for a broad range of Drupal core functionality.
Developers can learn how to use a particular API quickly by experimenting with the examples, and adapt them for their own use.
Download the Examples for Developers Project (and participate with submissions, bug reports, patches, and documentation) at http://drupal.org/project/examples
File
-
./
examples.module, line 19
Functions
Title Sort descending | File name | Summary |
---|---|---|
examples_toolbar | ./ |
Implements hook_toolbar(). |
_examples_toolbar_routes | ./ |
Get a list of toolbar links to provide. |
Classes
Title Sort descending | File name | Summary |
---|---|---|
ExamplesTest | tests/ |
Minimal test case for the examples module. |
Sub-Topics
Title Sort descending | File name | Summary |
---|---|---|
Example: AJAX | modules/ |
These examples show basic AJAX concepts. |
Example: Batch API | modules/ |
Outlines how a module can use the Batch API. |
Example: Block | modules/ |
Demonstrates code creation of blocks. |
Example: Cache API | modules/ |
Demonstrates how a module can use the Cache API. |
Example: Config Entity | modules/ |
Implement a Config Entity. |
Example: Config Node Type | modules/ |
A basic example of defining a content type through configuration YAML files. |
Example: Content Entity | modules/ |
Implement a content entity. |
Example: Cron | modules/ |
Example using Cron API, including hook_cron() and @QueueWorker plugins |
Example: Database (DBTNG) | modules/ |
Database examples, including DBTNG. |
Example: Draggable Table Forms | modules/ |
|
Example: Events | modules/ |
Demonstrates subscribing to, and dispatching, events. |
Example: Field Permissions | modules/ |
Example using permissions on a Field API field. |
Example: Field Types API | modules/ |
Examples using Field Types API. |
Example: Forms API | modules/ |
Examples using Forms API. |
Example: Hooks | modules/ |
Demonstrates implementing, defining, and invoking hooks. |
Example: JavaScript | modules/ |
Examples using Drupal 8's built-in JavaScript. |
Example: Page | modules/ |
This example demonstrates how a module can display a page at a given URL. |
Example: Pager | modules/ |
Output nodes in the table with pagination. |
Example: PHPUnit | modules/ |
This example demonstrates PHPUnit for Drupal 8 unit testing. |
Example: Plugin Types | modules/ |
Example of how to define a plugin type. |
Example: Queue | modules/ |
Demonstrating the Queue API |
Example: Render API | modules/ |
The Render API consists of two parts: one, structured arrays that provide data, and hints about how that data should be rendered, and two, a rendering pipeline that can be used to render these arrays into various output formats. This example moduleā¦ |
Example: REST | modules/ |
This module will give you a brief demonstration of how the REST service works. |
Example: Session | modules/ |
Demonstrating how to manipulate sessions in Drupal 8. |
Example: Stream Wrappers | modules/ |
@group stream_wrapper_example |
Example: Tablesort | modules/ |
Example of a sortable table display. Three columns are sortable (Numbers, Letters and Mixture) We are using TableSort Extender extend('Drupal\Core\Database\Query\TableSortExtender') |
Example: Testing | modules/ |
This example demonstrates Drupal 8 testing frameworks. |
Example: Theming | modules/ |
Example of Drupal theming. |
Example: Tour | modules/ |
The Tour module allows you you make instructional tours of user interfaces. |