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

templates/branch-default-page.html.twig
{#
/**
 * @file
 * Displays a branch overview page.
 *
 * Available variables:
 * - branch: Information about the branch to display an overview of.
 * - types: Types of documentation elements available.
 * - topics: List of defined topics in a branch.
 * - api_admin_permission: Whether current user has admin permissions on the module or not.
 *
 * @ingroup themeable
 */
#}
{% if branch is not empty %}
  {% if types.groups is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'groups',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Topics'|t }}</a>
    </h3>
    {{ def_group }}
    {{ topics }}
  {% endif %}

  {% if types.files is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'files',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Files'|t }}</a>
    </h3>
  {% endif %}

  {% if types.globals is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'globals',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Globals'|t }}</a>
    </h3>
  {% endif %}

  {% if types.constants is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'constants',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Constants'|t }}</a>
    </h3>
  {% endif %}

  {% if types.functions is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'functions',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Functions'|t }}</a>
    </h3>
  {% endif %}

  {% if types.classes is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'classes',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Classes and Interfaces'|t }}</a>
    </h3>
  {% endif %}

  {% if types.namespaces is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'namespaces',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Namespaces'|t }}</a>
    </h3>
  {% endif %}

  {% if types.deprecated is not empty %}
    <h3>
      <a href='{{
        path('api.branch_explicit_route', {
          'project': branch.getProject().getSlug(),
          'argument': 'deprecated',
          'branch': branch.getSlug()
        })
      }}'>{{ 'Deprecated'|t }}</a>
    </h3>
  {% endif %}

  <h3>{{ 'API search'|t }}</h3>
  {{ search_form }}

  {% if other_projects %}
    <p class="api-switch"><strong><a href="{{ path('api.projects') }}">{{ 'Other projects'|t }}</a></strong></p>
  {% endif %}
{% endif %}

{% if api_admin_permission %}
  <p class="api-no-mainpage"><em>{{ 'A main page for this branch has not been indexed. A documentation comment with <code>@mainpage</code> needs to exist, or has not been indexed yet. For older versions of Drupal core, this is available in the <a href="https://www.drupal.org/project/documentation">documentation project</a> in the <code>developer</code> subdirectory.'|t }}</em></p>
{% endif %}

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

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