Skip to content

Commit 7d3bfe1

Browse files
committed
Don't use deprecated getTypes in layouts. Use getType instead
1 parent f9be9a3 commit 7d3bfe1

File tree

5 files changed

+315
-315
lines changed

5 files changed

+315
-315
lines changed

class/base.element.html.twig

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,95 @@
1-
{% import 'base/macros.html.twig' as macros %}
2-
3-
<h1 class="element__header">{{ node.name }}</h1>
4-
5-
{% if node.parent|length or node.interfaces|length %}
6-
<small class="pull-right">
7-
{% if node.parent|length %}
8-
Extends {{ node.parent|route|join(', ')|raw }}
9-
{% endif %}
10-
{% if node.interfaces|length %}
11-
Implements {{ node.interfaces|route|join(', ')|raw }}
12-
{% endif %}
13-
</small>
14-
{% endif %}
15-
16-
{% if node.summary %}
17-
<p class="element__summary">{{ node.summary }}</p>
18-
{% endif %}
19-
20-
{% if node.final or node.abstract or (node.tags.deprecated is defined) or node.description %}
21-
<div class="element__description">
22-
{% if node.final or node.abstract or (node.tags.deprecated is defined) %}
23-
<div class="pull-right">
24-
{% if node.final %}<span class="label">final</span>{% endif %}
25-
{% if node.abstract %}<span class="label">abstract</span>{% endif %}
26-
{% if node.tags.deprecated is defined %}<span class="label label-important">deprecated</span>{% endif %}
27-
</div>
28-
{% endif %}
29-
{% if node.description %}{{ node.description|markdown|raw }}{% endif %}
30-
</div>
31-
{% endif %}
32-
33-
{% if node.tags|length %}
34-
<table class="table table-condensed">
35-
{% for tagList in node.tags if tagList|length %}
36-
{% if tagList.0.name not in ['method', 'property', 'codeCoverageIgnore'] %}
37-
{% if tagList.0.name == 'package' and tagList.0.description == 'Default' %}
38-
{# Do not display the package tag if its value is "Default" #}
39-
{% else %}
40-
<tr>
41-
<th scope="row">
42-
{{ tagList.0.name }}
43-
{% if tagList.0.type %}
44-
{{ tagList.0.type|route|join('|')|raw }}
45-
{% endif %}
46-
</th>
47-
<td>
48-
{% for tag in tagList %}
49-
{% if tag.name == 'since' %}
50-
{{ tag.version|markdown|raw }}
51-
{% elseif tag.name == 'deprecated' %}
52-
{{ (tag.version ~ ' ' ~ tag.description)|markdown|raw }}
53-
{% elseif tag.name == 'see' %}
54-
{% if tag.reference|slice(0, 4) == 'http' %}
55-
{{ tag.reference|markdown|raw }}
56-
{% else %}
57-
{{ tag.reference|route|raw }}
58-
{% endif %}
59-
{% elseif tag.name == 'throws' %}
60-
{% set tTypes = tag.types|route|join('|')|raw %}
61-
{{ ('<code>' ~ tTypes ~ '</code>' ~ tag.description)|markdown|raw }}
62-
{% else %}
63-
{{ tag.description|markdown|raw }}
64-
{% endif %}
65-
{% endfor %}
66-
</td>
67-
</tr>
68-
{% endif %}
69-
{% endif %}
70-
{% endfor %}
71-
</table>
72-
{% endif %}
73-
74-
{% set specialMethods = node.magicMethods ? node.inheritedMethods.merge(node.magicMethods) : node.inheritedMethods %}
75-
{% if node.methods.merge(specialMethods)|length > 0 %}
76-
<h2>Methods</h2>
77-
{% for method in node.methods.merge(specialMethods)|sort_asc %}
78-
{% include 'class/method.html.twig' with {'method': method, 'node': node} %}
79-
{% endfor %}
80-
{% endif %}
81-
82-
{% if node.constants.merge(node.inheritedConstants)|length > 0 %}
83-
<h2>Constants</h2>
84-
{% for constant in node.constants.merge(node.inheritedConstants) %}
85-
{% include 'class/constant.html.twig' with {'constant': constant, 'node': node} %}
86-
{% endfor %}
87-
{% endif %}
88-
89-
{% set specialProperties = node.magicProperties ? node.inheritedProperties.merge(node.magicProperties) : node.inheritedProperties %}
90-
{% if node.properties.merge(specialProperties)|length > 0 %}
91-
<h2>Properties</h2>
92-
{% for property in node.properties.merge(specialProperties) %}
93-
{% include 'class/property.html.twig' with {'property': property, 'node': node} %}
94-
{% endfor %}
95-
{% endif %}
1+
{% import 'base/macros.html.twig' as macros %}
2+
3+
<h1 class="element__header">{{ node.name }}</h1>
4+
5+
{% if node.parent|length or node.interfaces|length %}
6+
<small class="pull-right">
7+
{% if node.parent|length %}
8+
Extends {{ node.parent|route|join(', ')|raw }}
9+
{% endif %}
10+
{% if node.interfaces|length %}
11+
Implements {{ node.interfaces|route|join(', ')|raw }}
12+
{% endif %}
13+
</small>
14+
{% endif %}
15+
16+
{% if node.summary %}
17+
<p class="element__summary">{{ node.summary }}</p>
18+
{% endif %}
19+
20+
{% if node.final or node.abstract or (node.tags.deprecated is defined) or node.description %}
21+
<div class="element__description">
22+
{% if node.final or node.abstract or (node.tags.deprecated is defined) %}
23+
<div class="pull-right">
24+
{% if node.final %}<span class="label">final</span>{% endif %}
25+
{% if node.abstract %}<span class="label">abstract</span>{% endif %}
26+
{% if node.tags.deprecated is defined %}<span class="label label-important">deprecated</span>{% endif %}
27+
</div>
28+
{% endif %}
29+
{% if node.description %}{{ node.description|markdown|raw }}{% endif %}
30+
</div>
31+
{% endif %}
32+
33+
{% if node.tags|length %}
34+
<table class="table table-condensed">
35+
{% for tagList in node.tags if tagList|length %}
36+
{% if tagList.0.name not in ['method', 'property', 'codeCoverageIgnore'] %}
37+
{% if tagList.0.name == 'package' and tagList.0.description == 'Default' %}
38+
{# Do not display the package tag if its value is "Default" #}
39+
{% else %}
40+
<tr>
41+
<th scope="row">
42+
{{ tagList.0.name }}
43+
{% if tagList.0.type %}
44+
{{ tagList.0.type|route|join('|')|raw }}
45+
{% endif %}
46+
</th>
47+
<td>
48+
{% for tag in tagList %}
49+
{% if tag.name == 'since' %}
50+
{{ tag.version|markdown|raw }}
51+
{% elseif tag.name == 'deprecated' %}
52+
{{ (tag.version ~ ' ' ~ tag.description)|markdown|raw }}
53+
{% elseif tag.name == 'see' %}
54+
{% if tag.reference|slice(0, 4) == 'http' %}
55+
{{ tag.reference|markdown|raw }}
56+
{% else %}
57+
{{ tag.reference|route|raw }}
58+
{% endif %}
59+
{% elseif tag.name == 'throws' %}
60+
{% set tTypes = tag.type|route|join('|')|raw %}
61+
{{ ('<code>' ~ tTypes ~ '</code>' ~ tag.description)|markdown|raw }}
62+
{% else %}
63+
{{ tag.description|markdown|raw }}
64+
{% endif %}
65+
{% endfor %}
66+
</td>
67+
</tr>
68+
{% endif %}
69+
{% endif %}
70+
{% endfor %}
71+
</table>
72+
{% endif %}
73+
74+
{% set specialMethods = node.magicMethods ? node.inheritedMethods.merge(node.magicMethods) : node.inheritedMethods %}
75+
{% if node.methods.merge(specialMethods)|length > 0 %}
76+
<h2>Methods</h2>
77+
{% for method in node.methods.merge(specialMethods)|sort_asc %}
78+
{% include 'class/method.html.twig' with {'method': method, 'node': node} %}
79+
{% endfor %}
80+
{% endif %}
81+
82+
{% if node.constants.merge(node.inheritedConstants)|length > 0 %}
83+
<h2>Constants</h2>
84+
{% for constant in node.constants.merge(node.inheritedConstants) %}
85+
{% include 'class/constant.html.twig' with {'constant': constant, 'node': node} %}
86+
{% endfor %}
87+
{% endif %}
88+
89+
{% set specialProperties = node.magicProperties ? node.inheritedProperties.merge(node.magicProperties) : node.inheritedProperties %}
90+
{% if node.properties.merge(specialProperties)|length > 0 %}
91+
<h2>Properties</h2>
92+
{% for property in node.properties.merge(specialProperties) %}
93+
{% include 'class/property.html.twig' with {'property': property, 'node': node} %}
94+
{% endfor %}
95+
{% endif %}

class/constant.html.twig

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
1-
{% import 'base/macros.html.twig' as macros %}
2-
3-
<div class="element__node node--clickable node--constant node--visibility-public{{ constant.parent.name != node.name ? ' node--inherited' : '' }}" id="constant_{{ constant.name }}" data-toggle="collapse" data-target="#constant_{{ constant.name }} .collapse">
4-
<h3 class="node__header">{{ constant.name }}</h3>
5-
6-
{% if constant.summary %}
7-
{{ constant.summary|markdown|raw }}
8-
{% endif %}
9-
10-
{% if (constant.parent.name != node.name) or (constant.tags.deprecated is defined) %}
11-
<div class="pull-right">
12-
{% if constant.parent.name != node.name %}<span class="label">inherited</span>{% endif %}
13-
{% if constant.tags.deprecated is defined %}<span class="label label-important">deprecated</span>{% endif %}
14-
</div>
15-
{% endif %}
16-
17-
<div class="collapse">
18-
{% if constant.description %}
19-
<div class="node__description">{{ constant.description|markdown|raw }}</div>
20-
{% endif %}
21-
22-
<table class="table table-condensed">
23-
<tbody>
24-
<tr>
25-
<th scope="row">Value</th>
26-
<td>{{ constant.value }}</td>
27-
</tr>
28-
{% if constant.tags|length > 0 %}
29-
{% for tagList in constant.tags if tagList|length %}
30-
{% if tagList.0.name not in ['var'] %}
31-
{% if tagList.0.name == 'package' and tagList.0.description == 'Default' %}
32-
{# Do not display the package tag if its value is "Default" #}
33-
{% else %}
34-
<tr>
35-
<th scope="row">
36-
{{ tagList.0.name }}
37-
</th>
38-
<td>
39-
{% for tag in tagList %}
40-
{% if tag.name == 'since' %}
41-
{{ tag.version|markdown|raw }}
42-
{% elseif tag.name == 'deprecated' %}
43-
{{ (tag.version ~ ' ' ~ tag.description)|markdown|raw }}
44-
{% elseif tag.name == 'see' %}
45-
{% if tag.reference|slice(0, 4) == 'http' %}
46-
{{ tag.reference|markdown|raw }}
47-
{% else %}
48-
{{ tag.reference|route|raw }}
49-
{% endif %}
50-
{% else %}
51-
{{ tag.description|markdown|raw }}
52-
{% endif %}
53-
{% endfor %}
54-
</td>
55-
</tr>
56-
{% endif %}
57-
{% endif %}
58-
{% endfor %}
59-
{% endif %}
60-
</tbody>
61-
</table>
62-
63-
{% if constant.types and constant.types|join() != 'void' %}
64-
<h4 class="node__subheader">Type(s)</h4>
65-
<code>{{ constant.types|route|join('|')|raw }}</code>
66-
{% endif %}
67-
</div>
68-
</div>
1+
{% import 'base/macros.html.twig' as macros %}
2+
3+
<div class="element__node node--clickable node--constant node--visibility-public{{ constant.parent.name != node.name ? ' node--inherited' : '' }}" id="constant_{{ constant.name }}" data-toggle="collapse" data-target="#constant_{{ constant.name }} .collapse">
4+
<h3 class="node__header">{{ constant.name }}</h3>
5+
6+
{% if constant.summary %}
7+
{{ constant.summary|markdown|raw }}
8+
{% endif %}
9+
10+
{% if (constant.parent.name != node.name) or (constant.tags.deprecated is defined) %}
11+
<div class="pull-right">
12+
{% if constant.parent.name != node.name %}<span class="label">inherited</span>{% endif %}
13+
{% if constant.tags.deprecated is defined %}<span class="label label-important">deprecated</span>{% endif %}
14+
</div>
15+
{% endif %}
16+
17+
<div class="collapse">
18+
{% if constant.description %}
19+
<div class="node__description">{{ constant.description|markdown|raw }}</div>
20+
{% endif %}
21+
22+
<table class="table table-condensed">
23+
<tbody>
24+
<tr>
25+
<th scope="row">Value</th>
26+
<td>{{ constant.value }}</td>
27+
</tr>
28+
{% if constant.tags|length > 0 %}
29+
{% for tagList in constant.tags if tagList|length %}
30+
{% if tagList.0.name not in ['var'] %}
31+
{% if tagList.0.name == 'package' and tagList.0.description == 'Default' %}
32+
{# Do not display the package tag if its value is "Default" #}
33+
{% else %}
34+
<tr>
35+
<th scope="row">
36+
{{ tagList.0.name }}
37+
</th>
38+
<td>
39+
{% for tag in tagList %}
40+
{% if tag.name == 'since' %}
41+
{{ tag.version|markdown|raw }}
42+
{% elseif tag.name == 'deprecated' %}
43+
{{ (tag.version ~ ' ' ~ tag.description)|markdown|raw }}
44+
{% elseif tag.name == 'see' %}
45+
{% if tag.reference|slice(0, 4) == 'http' %}
46+
{{ tag.reference|markdown|raw }}
47+
{% else %}
48+
{{ tag.reference|route|raw }}
49+
{% endif %}
50+
{% else %}
51+
{{ tag.description|markdown|raw }}
52+
{% endif %}
53+
{% endfor %}
54+
</td>
55+
</tr>
56+
{% endif %}
57+
{% endif %}
58+
{% endfor %}
59+
{% endif %}
60+
</tbody>
61+
</table>
62+
63+
{% if constant.type and constant.type|join() != 'void' %}
64+
<h4 class="node__subheader">Type(s)</h4>
65+
<code>{{ constant.type|route|join('|')|raw }}</code>
66+
{% endif %}
67+
</div>
68+
</div>

0 commit comments

Comments
 (0)