-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrait.html.twig
151 lines (137 loc) · 5.64 KB
/
trait.html.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{% extends 'layout.html.twig' %}
{% macro parent_links(parent, indent) %}
<dd style="padding-left:{{ indent }}px">
{% if indent > 0 %}
<img src="imgs/inherit.png" alt="Extended by">
{% endif %}
<a href="{{ parent|route('url') }}">{{ parent }}</a>
{% if parent.interfaces is not empty %}
implements
{% for interface in parent.interfaces %}
{{ interface|route('class:short') }}{% if not loop.last %}, {% endif %}
{% endfor %}
{% endif %}
{% if parent.usedTraits is not empty %}
uses
{% for trait in parent.usedTraits %}
{{ trait|route('class:short') }}{% if not loop.last %}, {% endif %}
{% endfor %}
{% endif %}
</dd>
{% if parent.parent %}
{{ _self.parent_links(parent.parent, indent+30) }}
{% endif %}
{% endmacro %}
{% macro print_method(method) %}
<tr data-order="{{method.name}}" id="{{method.name}}" n:class="{{method.deprecated ? 'deprecated'}}">
<td class="attributes"><code>
{{ method.visibility }}
{% if method.deprecated %}deprecated{% endif %}
{% if method.abstract %}abstract{% endif %}
{% if method.static %}static{% endif %}
{% if method.final %}final{% endif %}
</code>
</td>
<td class="name">
<div>
<a name="method_{{method.name}}"></a>
<code>
{% apply spaceless %}
<a href="{{ link(method) }}">{{ method.name }}</a>
<span>(</span>
{% for argument in method.arguments %}
<span class="phpdocumentor-signature__argument">
{% if argument.default is not null %}<span>[</span>{% endif %}
{% if not loop.first %}<span>, </span>{% endif %}
<span class="phpdocumentor-signature__argument__return-type">{{ argument.type|route('class:short')|join('|')|raw }} </span>
{% if argument.isVariadic %}<span class="phpdocumentor-signature__argument__variadic-operator">...</span>{% endif %}
{%- if argument.byReference -%}<span class="phpdocumentor-signature__argument__reference-operator">&</span>{%- endif -%}
<var>${{ argument.name }}</var>
{% if argument.default is not null %}
<span> = </span>
<span class="phpdocumentor-signature__argument__default-value">{{ argument.default }}</span>
<span> ]</span>
{% endif %}
</span>
{% endfor %}
<span>)</span>
<span> : </span>
<span>{{ method.response.type|route('class:short')|join('|')|raw }}</span>
{% endapply %}
</code>
<div class="description short">
{{ method.summary }}
{{ method.description|description|markdown }}
</div>
</div>
</td>
</tr>
{% endmacro %}
{% macro print_constant(constant) %}
<tr data-order="{{constant.name}}" id="{{constant.name}}" n:class="{{constant.deprecated ? 'deprecated'}}">
<td class="attributes">
<code>
{{ constant.visibility }}
{% if constant.deprecated %}deprecated{% endif %}
{{ not constant.type ? "mixed" : constant.type|route('class:short')|join('|')|raw }}
</code>
</td>
<td class="name">
<code>
<a name="constant_{{constant.name}}"><b>{{constant.name}}</b></a>
</code>
<div class="description short">
{{ constant.summary }}
</div>
</td>
<td class="value">
<div>
<code>{{ constant.value | default('""') }}</code>
</div>
</td>
</tr>
{% endmacro %}
{% block title %}
{{ node.name }} » {{ project.name }}
{% endblock %}
{% block content %}
<article class="phpdocumentor-element -class">
<h1>Trait
{% for breadcrumb in breadcrumbs(node) %}\<a href="{{ link(breadcrumb) }}">{{ breadcrumb.name }}</a>{% endfor %}\<a href="{{ node|route('url') }}">{{ node.name }}</a>
</h1>
<div class="description">
{{ node.summary }}
{{ node.description|description|markdown }}
</div>
<h4>Trait hierarchy</h4>
<dl class="tree">
{{ _self.parent_links(node, 0) }}
</dl>
{% for author in node.author %}
<b>Author:</b> {{ author.description }}<br/>
{% endfor %}
{% for since in node.tags.since %}
<b>Since:</b> {{ since.version }}<br/>
{% endfor %}
{% for deprecated in node.tags.deprecated %}
<b>Deprecated since:</b> {{ deprecated.version }}<br/>
{% endfor %}
{% set methods = node.methods|sortByVisibility %}
<table class="summary methods" id="methods">
<caption>Methods summary</caption>
{% for method in methods %}
{{ _self.print_method(method) }}
{% endfor %}
</table>
{% set methods = node.inheritedMethods|sortByVisibility %}
<table class="summary inherited" >
<caption>Inherited methods</caption>
<tbody><tr>
<td><code>
{% for method in methods %}
<a href="{{ link(method) }}">{{ method.name }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</code></td>
</tr>
</tbody></table>
{% endblock %}