You are here

restui-resource-info.html.twig in REST UI 8

Default theme implementation for basic administrative info about a REST resource.

Available variables:

File

templates/restui-resource-info.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for basic administrative info about a REST resource.
  5. *
  6. * Available variables:
  7. * - granularity: string REST resource granularity. Either
  8. * \Drupal\rest\RestResourceConfigInterface::METHOD_GRANULARITY or
  9. * \Drupal\rest\RestResourceConfigInterface::RESOURCE_GRANULARITY.
  10. * - configuration: array REST resource config.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {% if granularity == 'resource' %}
  16. <p>methods: {{ configuration.methods|join(', ') }}<br>
  17. formats: {{ configuration.formats|join(', ') }}<br>
  18. authentication: {{ configuration.authentication|join(', ') }}
  19. </p>
  20. {% else %}
  21. {% for method, properties in configuration %}
  22. <p>{{ method }}<br>
  23. formats: {{ properties.supported_formats|join(', ') }}<br>
  24. authentication: {{ properties.supported_auth|join(', ') }}
  25. </p>
  26. {% endfor %}
  27. {% endif %}