-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.phpdoc/template/trait.html.twig: Add missing template
- Loading branch information
1 parent
adf8181
commit cb1243e
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
tools/php_api_ref/.phpdoc/template/components/trait-title.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% set breadcrumbs = usesNamespaces ? breadcrumbs(node) : packages(node) %} | ||
{% set fqcn = breadcrumbs|map(breadcrumb => breadcrumb.name)|join('\\') ~ '\\' ~ node.name %} | ||
|
||
{% embed 'components/content-header.html.twig' with { | ||
anchor: node.name, | ||
anchor_link: '#' ~ node.name, | ||
fqcn, | ||
add_edition: true, | ||
} %} | ||
{% block subheader %} | ||
<div class="content-header__subheader">Trait</div> | ||
|
||
{% if node.usedTraits is not empty %} | ||
<div class="content-header__subheader"> | ||
Uses | ||
{% for trait in node.usedTraits %} | ||
{{ trait|route('class:short') }}{% if not loop.last %}, {% endif %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% endembed %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}{{ node.name }} | {{ parent() }}{% endblock %} | ||
{% block meta %} | ||
<meta name="description" content="{{ node.summary|escape }}" /> | ||
{{ parent() }} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% include 'components/breadcrumbs.html.twig' %} | ||
{% include 'components/trait-title.html.twig' with { symfony_version: symfony_version } %} | ||
{% include('components/element-header.html.twig') %} | ||
{% include 'components/constants.html.twig' %} | ||
{% include 'components/properties.html.twig' %} | ||
{% include 'components/methods.html.twig' %} | ||
{% endblock %} | ||
|
||
{% block on_this_page %} | ||
{% set constants = constants(node) %} | ||
{% set properties = properties(node) %} | ||
{% set methods = methods(node) %} | ||
|
||
{% if constants is not empty or properties is not empty or methods is not empty %} | ||
<label class="md-nav__title" for="__toc" title="{{ node.name }}"> | ||
{{ node.name }} | ||
</label> | ||
{% endif %} | ||
|
||
<ul class="md-nav__list"> | ||
{% if constants is not empty %} | ||
<li class="md-nav__item level-1 with-children"> | ||
<a href="{{ node|route("url")|raw }}#constants" title="Constants" class="md-nav__link"> | ||
Constants | ||
</a> | ||
<nav class="md-nav"> | ||
<ul class="md-nav__list"> | ||
{% for constant in constants|sortByVisibility %} | ||
<li class="md-nav__item level-2"> | ||
<a href="{{ link(constant) }}" title="{{ constant.name }}" class="md-nav__link"> | ||
{{ constant.name }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
</li> | ||
{% endif %} | ||
{% if properties is not empty %} | ||
<li class="md-nav__item level-1 with-children"> | ||
<a href="{{ node|route("url")|raw }}#properties" title="Properties" class="md-nav__link"> | ||
Properties | ||
</a> | ||
<nav class="md-nav"> | ||
<ul class="md-nav__list"> | ||
{% set treated_properties = [] %} | ||
{% for property in properties|sortByVisibility %} | ||
{% if property.__toString() not in treated_properties %} | ||
<li class="md-nav__item level-2"> | ||
<a href="{{ link(property) }}" title="{{ property.name }}" class="md-nav__link"> | ||
{{ property.name }} | ||
</a> | ||
</li> | ||
{% set treated_properties = treated_properties|merge([property.__toString()]) %} | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
</li> | ||
{% endif %} | ||
{% if methods is not empty %} | ||
<li class="md-nav__item level-1 with-children"> | ||
<a href="{{ node|route("url")|raw }}#methods" title="Methods" class="md-nav__link"> | ||
Methods | ||
</a> | ||
<nav class="md-nav"> | ||
<ul class="md-nav__list"> | ||
{% for method in methods|sortByVisibility %} | ||
<li class="md-nav__item level-2"> | ||
<a href="{{ link(method) }}" title="{{ method.name }}" class="md-nav__link"> | ||
{{ method.name }}() | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% endblock %} |