description.html.twig

Same filename in this branch
  1. 4.0.x modules/menu_example/templates/description.html.twig
  2. 4.0.x modules/form_api_example/templates/description.html.twig
  3. 4.0.x modules/js_example/templates/description.html.twig
  4. 4.0.x modules/page_example/templates/description.html.twig
  5. 4.0.x modules/node_type_example/templates/description.html.twig
  6. 4.0.x modules/pager_example/templates/description.html.twig
  7. 4.0.x modules/block_example/templates/description.html.twig
  8. 4.0.x modules/tabledrag_example/templates/description.html.twig
  9. 4.0.x modules/rest_example/templates/description.html.twig
  10. 4.0.x modules/testing_example/templates/description.html.twig
  11. 4.0.x modules/tour_example/templates/description.html.twig
  12. 4.0.x modules/config_entity_example/templates/description.html.twig
  13. 4.0.x modules/phpunit_example/templates/description.html.twig
  14. 4.0.x modules/render_example/templates/description.html.twig
  15. 4.0.x modules/field_permission_example/templates/description.html.twig
  16. 4.0.x modules/ajax_example/templates/description.html.twig
  17. 4.0.x modules/hooks_example/templates/description.html.twig
  18. 4.0.x modules/field_example/templates/description.html.twig
  19. 4.0.x tests/modules/examples_description_test/templates/description.html.twig
  20. 4.0.x modules/config_simple_example/templates/description.html.twig
Same filename in other branches
  1. 3.x modules/menu_example/templates/description.html.twig
  2. 3.x modules/form_api_example/templates/description.html.twig
  3. 3.x modules/js_example/templates/description.html.twig
  4. 3.x modules/page_example/templates/description.html.twig
  5. 3.x modules/node_type_example/templates/description.html.twig
  6. 3.x modules/pager_example/templates/description.html.twig
  7. 3.x modules/block_example/templates/description.html.twig
  8. 3.x modules/tabledrag_example/templates/description.html.twig
  9. 3.x modules/rest_example/templates/description.html.twig
  10. 3.x modules/testing_example/templates/description.html.twig
  11. 3.x modules/tour_example/templates/description.html.twig
  12. 3.x modules/config_entity_example/templates/description.html.twig
  13. 3.x modules/phpunit_example/templates/description.html.twig
  14. 3.x modules/render_example/templates/description.html.twig
  15. 3.x modules/field_permission_example/templates/description.html.twig
  16. 3.x modules/stream_wrapper_example/templates/description.html.twig
  17. 3.x modules/ajax_example/templates/description.html.twig
  18. 3.x modules/hooks_example/templates/description.html.twig
  19. 3.x modules/field_example/templates/description.html.twig
  20. 3.x tests/modules/examples_description_test/templates/description.html.twig
  21. 8.x-1.x menu_example/templates/description.html.twig
  22. 8.x-1.x form_api_example/templates/description.html.twig
  23. 8.x-1.x js_example/templates/description.html.twig
  24. 8.x-1.x page_example/templates/description.html.twig
  25. 8.x-1.x node_type_example/templates/description.html.twig
  26. 8.x-1.x pager_example/templates/description.html.twig
  27. 8.x-1.x block_example/templates/description.html.twig
  28. 8.x-1.x tabledrag_example/templates/description.html.twig
  29. 8.x-1.x testing_example/templates/description.html.twig
  30. 8.x-1.x tour_example/templates/description.html.twig
  31. 8.x-1.x config_entity_example/templates/description.html.twig
  32. 8.x-1.x tests/modules/examples_description_test/templates/description.html.twig
  33. 8.x-1.x phpunit_example/templates/description.html.twig
  34. 8.x-1.x render_example/templates/description.html.twig
  35. 8.x-1.x field_permission_example/templates/description.html.twig
  36. 8.x-1.x stream_wrapper_example/templates/description.html.twig
  37. 8.x-1.x ajax_example/templates/description.html.twig
  38. 8.x-1.x hooks_example/templates/description.html.twig
  39. 8.x-1.x field_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

modules/stream_wrapper_example/templates/description.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Contains the description text of an Example explanation/description page
  5. *
  6. * Available variables:
  7. * - admin_link: The translated link pointing to a configuration page for the example.
  8. */
  9. #}
  10. <div class='examples-description'>
  11. {% trans %}
  12. <p>The Stream Wrapper Example module demonstrates a PHP stream wrapper implementation.
  13. A stream wrapper is a class that implements something that looks and behaves like a
  14. file system. A particular implementation of a stream wrapper is called a <em>scheme</em>.
  15. Drupal 8 supports public, private, and temporary wrapper schemes. For example, you
  16. access a file in your public uploads directory via a "public" file URI such as
  17. <code>public://images/big-logo.png</code>. When you read, write, delete or move that
  18. file, the <code>public</code> scheme's stream wrapper class
  19. (<code>\Drupal\Core\StreamWrapper\PublicStream</code>) is invoked to do the reading,
  20. writing, deletion or moving. PHP does this automatically for you, creating the wrapper
  21. whenever some file operation needs to get done on a <code>public://</code> file.
  22. </p>
  23. <p>To demonstrate how to implement a stream wrapper, this example module creates a
  24. <code>session</code> wrapper scheme. It uses your session data (created when you
  25. log into Drupal) to create a nested array where the arrays represent directories,
  26. and scalar values represent files. This is completely impractical, and frankly,
  27. not terribly secure, so you should never enable this module on any site that's
  28. open to the Internet. But without using any special libraries, our stream wrapper
  29. class is able to create and delete directories, and read and write files.
  30. </p>
  31. <p>If you want to play with <code>session</code> file URIs, we recommend also enabling
  32. the File Example (file_example.module), which will let you do the same things with
  33. the "session" scheme that you can do with public, private or temporary files.</p>
  34. <p>A longer description of what code is where can be found in
  35. <code>stream_wrapper_example.module</code>. Definitely look through the code to see
  36. various implementation details.</p>
  37. {% endtrans %}
  38. </div>