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/testing_example/templates/description.html.twig
  10. 4.0.x modules/tour_example/templates/description.html.twig
  11. 4.0.x modules/config_entity_example/templates/description.html.twig
  12. 4.0.x modules/phpunit_example/templates/description.html.twig
  13. 4.0.x modules/render_example/templates/description.html.twig
  14. 4.0.x modules/field_permission_example/templates/description.html.twig
  15. 4.0.x modules/stream_wrapper_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
{#

Description text for the Rest Example.

#}

{% set rest_client_settings = path('rest_example.client_settings') %}
{% set rest_client_actions = path('rest_example.client_actions_index') %}

{% trans %}
<p>This module will give you a brief demonstration of how the REST service works</p>
<p>This example uses nodes, because they works out of the box. But any entity could be used.</p>
<p>To complete a demo, we will need a server site, containing the nodes, and a client, that sends requests to the server. The same site can very well act as both client and server.</p>
<p>First thing you want to do, is visit <a href="{{ rest_client_settings }}">examples/rest-client-settings</a> and set up what website you want to interact with. To avoid complications, and minimize the chance of failure, we suggest that you start using the same site as both server and client, using the user #1 credentials. And when you have gotten the feel of how things work, try to use two separate sites, and maybe another user. Please note that you need to install this module on both client and server site.</p>
<p>Next thing you want is to go to <a href="{{ rest_client_actions }}">examples/rest-client-actions</a>. This page contains a table where all the remote nodes, of the type rest_example_test, will be displayed. At first there might not be any.</p>
<p>From the same page you can create, edit and delete nodes on the remote site.</p>
<p>The server site actually only uses the View (rest_service) and the node type (rest_example_test), imported upon installation of this module. The rest of the functionality comes from Drupal Core modules, like "rest", "basic_auth" and "hal".</p>

<h3>The client part of the site uses the following classes:</h3>
<ul>
    <li>
        <p><code>\Drupal\rest_example\Controller\RestExampleClientController::indexAction()</code>: Builds the list of nodes on the remote server.</p>
    </li>
    <li>
        <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form that can creates/edits nodes.</p>
    </li>
    <li>
        <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form used to confirm the deletion of the node.</p>
    </li>
    <li>
        <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form where you set up with which site you want to interact.</p>
    </li>
    <li>
        <p><code>\Drupal\rest_example\RestExampleClientCalls</code>: This class handles all the calls to the remote site, and returns the response back, to be processed by the requesting method.</p>
    </li>
</ul>
{% endtrans %}

File

modules/rest_example/templates/description.html.twig

View source
  1. {#
  2. Description text for the Rest Example.
  3. #}
  4. {% set rest_client_settings = path('rest_example.client_settings') %}
  5. {% set rest_client_actions = path('rest_example.client_actions_index') %}
  6. {% trans %}
  7. <p>This module will give you a brief demonstration of how the REST service works</p>
  8. <p>This example uses nodes, because they works out of the box. But any entity could be used.</p>
  9. <p>To complete a demo, we will need a server site, containing the nodes, and a client, that sends requests to the server. The same site can very well act as both client and server.</p>
  10. <p>First thing you want to do, is visit <a href="{{ rest_client_settings }}">examples/rest-client-settings</a> and set up what website you want to interact with. To avoid complications, and minimize the chance of failure, we suggest that you start using the same site as both server and client, using the user #1 credentials. And when you have gotten the feel of how things work, try to use two separate sites, and maybe another user. Please note that you need to install this module on both client and server site.</p>
  11. <p>Next thing you want is to go to <a href="{{ rest_client_actions }}">examples/rest-client-actions</a>. This page contains a table where all the remote nodes, of the type rest_example_test, will be displayed. At first there might not be any.</p>
  12. <p>From the same page you can create, edit and delete nodes on the remote site.</p>
  13. <p>The server site actually only uses the View (rest_service) and the node type (rest_example_test), imported upon installation of this module. The rest of the functionality comes from Drupal Core modules, like "rest", "basic_auth" and "hal".</p>
  14. <h3>The client part of the site uses the following classes:</h3>
  15. <ul>
  16. <li>
  17. <p><code>\Drupal\rest_example\Controller\RestExampleClientController::indexAction()</code>: Builds the list of nodes on the remote server.</p>
  18. </li>
  19. <li>
  20. <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form that can creates/edits nodes.</p>
  21. </li>
  22. <li>
  23. <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form used to confirm the deletion of the node.</p>
  24. </li>
  25. <li>
  26. <p><code>\Drupal\rest_example\Form\RestExampleClientSettings</code>: A form where you set up with which site you want to interact.</p>
  27. </li>
  28. <li>
  29. <p><code>\Drupal\rest_example\RestExampleClientCalls</code>: This class handles all the calls to the remote site, and returns the response back, to be processed by the requesting method.</p>
  30. </li>
  31. </ul>
  32. {% endtrans %}