restui-resource-info.html.twig in REST UI 8
Default theme implementation for basic administrative info about a REST resource.
Available variables:
- granularity: string REST resource granularity. Either \Drupal\rest\RestResourceConfigInterface::METHOD_GRANULARITY or \Drupal\rest\RestResourceConfigInterface::RESOURCE_GRANULARITY.
- configuration: array REST resource config.
1 theme call to restui-resource-info.html.twig
- RestUIController::listResources in src/
Controller/ RestUIController.php - Returns an administrative overview of all REST resources.
File
templates/restui-resource-info.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for basic administrative info about a REST resource.
- *
- * Available variables:
- * - granularity: string REST resource granularity. Either
- * \Drupal\rest\RestResourceConfigInterface::METHOD_GRANULARITY or
- * \Drupal\rest\RestResourceConfigInterface::RESOURCE_GRANULARITY.
- * - configuration: array REST resource config.
- *
- * @ingroup themeable
- */
- #}
- {% if granularity == 'resource' %}
- <p>methods: {{ configuration.methods|join(', ') }}<br>
- formats: {{ configuration.formats|join(', ') }}<br>
- authentication: {{ configuration.authentication|join(', ') }}
- </p>
- {% else %}
- {% for method, properties in configuration %}
- <p>{{ method }}<br>
- formats: {{ properties.supported_formats|join(', ') }}<br>
- authentication: {{ properties.supported_auth|join(', ') }}
- </p>
- {% endfor %}
- {% endif %}