api-8.x-1.x-dev/templates/service-page.html.twig

templates/service-page.html.twig
{#
/**
 * @file
 * Displays an API page for a service, including a list of tags.
 *
 * Available variables:
 * - alternatives: List of alternate versions (branches) of this class.
 * - defined: HTML reference to file that defines this service.
 * - code: HTML-formatted declaration and code for this service.
 * - git_url: The URL pointing to the origin of the source code.
 * - git_url_domain: Domain of the Git source URL, (e.g., git.drupalcode.org).
 * - tags: List of tags for this service.
 * - branch: Object with information about the branch.
 * - object: Object with information about the service.
 * - call_links: Links to references.
 *
 * @see api_preprocess_api_object_page()
 *
 * @ingroup themeable
 */
#}
{{ alternatives }}

{% if (class) %}
  <h3>{{ 'Class'|t }}</h3>
  {{ class|safe_markup }}
{% endif %}

{% if (tags) %}
  <h3>{{ 'Tags'|t }}</h3>
  {{ tags }}
{% endif %}

{% for link in call_links %}
  {{ link|safe_markup }}
{% endfor %}

<h3>{{ 'File'|t }}</h3>

{% if git_url is not empty %}
  <div class="git-link-wrapper">
    <a class="git-link" href="{{ git_url }}">{{ 'View on'|t }} {{ git_url_domain }}</a>
  </div>
{% endif %}

{{ defined }}

<details class="api-view-source">
  <summary>
    {{ 'View source'|t }}
  </summary>
  {{ code|safe_markup }}
</details>

{{ comments }}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc