forked from joomla/api.joomla.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
namespace.html.twig
100 lines (86 loc) · 3.34 KB
/
namespace.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
{% extends 'layout.html.twig' %}
{% macro renderNamespaceDetails(node) %}
{% import _self as self %}
{% import 'base/macros.html.twig' as macros %}
{% if node.classes|length > 0 or node.interfaces|length > 0 or node.traits|length > 0 or node.functions|length > 0 or node.constants|length > 0 %}
<ul class="breadcrumb">
<li><a href="{{ path('index.html') }}"><i class="icon-grid-view-2"></i></a></li>
{{ macros.buildBreadcrumb(node) }}
</ul>
{% if node.functions|length > 0 %}
<h2 class="namespace__header">Functions</h2>
<div class="namespace__functions">
{% for function in node.functions|sort_asc %}
{{ macros.elementSummary(function, 'function') }}
{% endfor %}
</div>
{% endif %}
{% if node.constants|length > 0 %}
<h2 class="namespace__header">Constants</h2>
<div class="namespace__constants">
{% for constant in node.constants|sort_asc %}
{{ macros.elementSummary(constant, 'constant') }}
{% endfor %}
</div>
{% endif %}
{% if node.traits|length > 0 %}
<h2 class="namespace__header">Traits</h2>
<div class="namespace__traits">
{% for trait in node.traits|sort_asc %}
{{ macros.elementSummary(trait, 'trait') }}
{% endfor %}
</div>
{% endif %}
{% if node.interfaces|length > 0 %}
<h2 class="namespace__header">Interfaces</h2>
<div class="namespace__traits">
{% for interface in node.interfaces|sort_asc %}
{{ macros.elementSummary(interface, 'interface') }}
{% endfor %}
</div>
{% endif %}
{% if node.classes|length > 0 %}
<h2 class="namespace__header">Classes</h2>
<div class="namespace__classes">
{% for class in node.classes|sort_asc %}
{{ macros.elementSummary(class, 'class') }}
{% endfor %}
</div>
{% endif %}
{% endif %}
{% for namespace in node.children|sort_asc %}
{{ self.renderNamespaceDetails(namespace) }}
{% endfor %}
{% endmacro %}
{% macro renderNamespaceSidebar(node) %}
{% import _self as self %}
{% for namespace in node.children|sort_asc %}
<li>
<a href="{{ path(namespace|route('url')) }}" title="{{ namespace.name }}">
<i class="icon-grid-view-2"></i> {{ namespace.name }}
</a>
<ul class="nav nav-list nav-namespaces">
{{ self.renderNamespaceSidebar(namespace) }}
</ul>
</li>
{% endfor %}
{% endmacro %}
{% block title %}
{{ parent() }} » {{ node.FullyQualifiedStructuralElementName }}
{% endblock %}
{% block content %}
{% import _self as self %}
<div class="row-fluid">
<aside class="span5">
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-map-marker"></i> Namespaces
</li>
{{ self.renderNamespaceSidebar(node) }}
</ul>
</aside>
<main class="span7 namespace">
{{ self.renderNamespaceDetails(node) }}
</main>
</div>
{% endblock %}