description.html.twig
Same filename in this branch
- 8.x-1.x menu_example/templates/description.html.twig
- 8.x-1.x form_api_example/templates/description.html.twig
- 8.x-1.x js_example/templates/description.html.twig
- 8.x-1.x page_example/templates/description.html.twig
- 8.x-1.x node_type_example/templates/description.html.twig
- 8.x-1.x pager_example/templates/description.html.twig
- 8.x-1.x block_example/templates/description.html.twig
- 8.x-1.x tabledrag_example/templates/description.html.twig
- 8.x-1.x testing_example/templates/description.html.twig
- 8.x-1.x tour_example/templates/description.html.twig
- 8.x-1.x config_entity_example/templates/description.html.twig
- 8.x-1.x tests/modules/examples_description_test/templates/description.html.twig
- 8.x-1.x phpunit_example/templates/description.html.twig
- 8.x-1.x render_example/templates/description.html.twig
- 8.x-1.x field_permission_example/templates/description.html.twig
- 8.x-1.x ajax_example/templates/description.html.twig
- 8.x-1.x hooks_example/templates/description.html.twig
- 8.x-1.x field_example/templates/description.html.twig
Same filename in other branches
- 3.x modules/menu_example/templates/description.html.twig
- 3.x modules/form_api_example/templates/description.html.twig
- 3.x modules/js_example/templates/description.html.twig
- 3.x modules/page_example/templates/description.html.twig
- 3.x modules/node_type_example/templates/description.html.twig
- 3.x modules/pager_example/templates/description.html.twig
- 3.x modules/block_example/templates/description.html.twig
- 3.x modules/tabledrag_example/templates/description.html.twig
- 3.x modules/rest_example/templates/description.html.twig
- 3.x modules/testing_example/templates/description.html.twig
- 3.x modules/tour_example/templates/description.html.twig
- 3.x modules/config_entity_example/templates/description.html.twig
- 3.x modules/phpunit_example/templates/description.html.twig
- 3.x modules/render_example/templates/description.html.twig
- 3.x modules/field_permission_example/templates/description.html.twig
- 3.x modules/stream_wrapper_example/templates/description.html.twig
- 3.x modules/ajax_example/templates/description.html.twig
- 3.x modules/hooks_example/templates/description.html.twig
- 3.x modules/field_example/templates/description.html.twig
- 3.x tests/modules/examples_description_test/templates/description.html.twig
- 4.0.x modules/menu_example/templates/description.html.twig
- 4.0.x modules/form_api_example/templates/description.html.twig
- 4.0.x modules/js_example/templates/description.html.twig
- 4.0.x modules/page_example/templates/description.html.twig
- 4.0.x modules/node_type_example/templates/description.html.twig
- 4.0.x modules/pager_example/templates/description.html.twig
- 4.0.x modules/block_example/templates/description.html.twig
- 4.0.x modules/tabledrag_example/templates/description.html.twig
- 4.0.x modules/rest_example/templates/description.html.twig
- 4.0.x modules/testing_example/templates/description.html.twig
- 4.0.x modules/tour_example/templates/description.html.twig
- 4.0.x modules/config_entity_example/templates/description.html.twig
- 4.0.x modules/phpunit_example/templates/description.html.twig
- 4.0.x modules/render_example/templates/description.html.twig
- 4.0.x modules/field_permission_example/templates/description.html.twig
- 4.0.x modules/stream_wrapper_example/templates/description.html.twig
- 4.0.x modules/ajax_example/templates/description.html.twig
- 4.0.x modules/hooks_example/templates/description.html.twig
- 4.0.x modules/field_example/templates/description.html.twig
- 4.0.x tests/modules/examples_description_test/templates/description.html.twig
- 4.0.x modules/config_simple_example/templates/description.html.twig
Contains the description text of an Example explanation/description page
Available variables:
- admin_link: The translated link pointing to a configuration page for the example.
File
-
stream_wrapper_example/
templates/ description.html.twig
View source
- {#
- /**
- * @file
- * Contains the description text of an Example explanation/description page
- *
- * Available variables:
- * - admin_link: The translated link pointing to a configuration page for the example.
- */
- #}
-
- <div class='examples-description'>
-
- {% trans %}
- <p>The Stream Wrapper Example module demonstrates a PHP stream wrapper implementation.
- A stream wrapper is a class that implements something that looks and behaves like a
- file system. A particular implementation of a stream wrapper is called a <em>scheme</em>.
- Drupal 8 supports public, private, and temporary wrapper schemes. For example, you
- access a file in your public uploads directory via a "public" file URI such as
- <code>public://images/big-logo.png</code>. When you read, write, delete or move that
- file, the <code>public</code> scheme's stream wrapper class
- (<code>\Drupal\Core\StreamWrapper\PublicStream</code>) is invoked to do the reading,
- writing, deletion or moving. PHP does this automatically for you, creating the wrapper
- whenever some file operation needs to get done on a <code>public://</code> file.
- </p>
-
- <p>To demonstrate how to implement a stream wrapper, this example module creates a
- <code>session</code> wrapper scheme. It uses your session data (created when you
- log into Drupal) to create a nested array where the arrays represent directories,
- and scalar values represent files. This is completely impractical, and frankly,
- not terribly secure, so you should never enable this module on any site that's
- open to the Internet. But without using any special libraries, our stream wrapper
- class is able to create and delete directories, and read and write files.
- </p>
-
- <p>If you want to play with <code>session</code> file URIs, we recommend also enabling
- the File Example (file_example.module), which will let you do the same things with
- the "session" scheme that you can do with public, private or temporary files.</p>
-
- <p>A longer description of what code is where can be found in
- <code>stream_wrapper_example.module</code>. Definitely look through the code to see
- various implementation details.</p>
- {% endtrans %}
-
- </div>