-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathmethod-arguments.html.twig
More file actions
45 lines (45 loc) · 1.93 KB
/
method-arguments.html.twig
File metadata and controls
45 lines (45 loc) · 1.93 KB
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
{% if node.arguments|length > 0 %}
<h4>Parameters</h4>
<table class="method-parameters">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Type</th>
<th scope="col">Default value</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{% for argument in node.arguments %}
<tr>
<td>
${{ argument.name }}
</td>
<td>
{{ argument.type|route('class:short')|join('|')|raw }}
</td>
<td{{ argument.default is empty ? ' class="empty"' }}>
{% if argument.default is not empty %}
{% if 'self::' in argument.default.render %}
{{ argument.default.render|replace({'\\self':argument.method|split('::')[0]})|route('class:short')|raw }}
{% elseif argument.default.render starts with '\\Ibexa\\Contracts\\' %}
{{ argument.default.render|route('class:short') }}
{% else %}
{{ argument.default }}
{% endif %}
{% else %}
-
{% endif %}
</td>
<td{{ argument.description is not defined or argument.description.empty ? ' class="empty"' }}>
{% if argument.description is not defined or argument.description.empty %}
-
{% else %}
{{ include('components/description.html.twig', {node: argument}) }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}