|
| 1 | +{% if depth == 0 %} |
| 2 | + {% if entry.children.count > 0 %} |
| 3 | + {% for child in entry.children %} |
| 4 | + {% include 'components/menu-entry.html.twig' with { |
| 5 | + title: entry.name|shortFQSEN ~ ' ' ~ child.name|shortFQSEN, |
| 6 | + nav_id: nav_id ~ '-' ~ loop.index, |
| 7 | + expanded: true, |
| 8 | + entry: child, |
| 9 | + } %} |
| 10 | + {% endfor %} |
| 11 | + {% endif %} |
| 12 | +{% else %} |
| 13 | + |
| 14 | + {% set index = 0 %} |
| 15 | + |
| 16 | + {% if entry.children.count > 0 %} |
| 17 | + {% if depth > 1 %} |
| 18 | + <label class="md-nav__list-title md-nav__list-title--namespaces"> |
| 19 | + Namespaces |
| 20 | + </label> |
| 21 | + {% endif %} |
| 22 | + <ul class="md-nav__list"> |
| 23 | + {% for child in entry.children %} |
| 24 | + {% include 'components/menu-entry.html.twig' with { |
| 25 | + title: child.name|shortFQSEN, |
| 26 | + nav_id: nav_id ~ '-' ~ index, |
| 27 | + entry: child, |
| 28 | + expanded: false, |
| 29 | + icon: 'folder.svg', |
| 30 | + type: 'namespace', |
| 31 | + } %} |
| 32 | + |
| 33 | + {% set index = index + 1 %} |
| 34 | + {% endfor %} |
| 35 | + </ul> |
| 36 | + {% endif %} |
| 37 | + |
| 38 | + {% if entry.interfaces[0] is defined or entry.classes[0] is defined or entry.traits[0] is defined or entry.enums[0] is defined %} |
| 39 | + {% if depth > 1 %} |
| 40 | + <label class="md-nav__list-title"> |
| 41 | + Interfaces, classes, traits, and enums |
| 42 | + </label> |
| 43 | + {% endif %} |
| 44 | + <ul class="md-nav__list"> |
| 45 | + {% if entry.interfaces[0] is defined %} |
| 46 | + {% for element in entry.interfaces|sort_asc %} |
| 47 | + {% include 'components/menu-entry.html.twig' with { |
| 48 | + title: element.name|shortFQSEN, |
| 49 | + nav_id: nav_id ~ '-' ~ index, |
| 50 | + entry: element, |
| 51 | + expanded: false, |
| 52 | + icon: 'file.svg', |
| 53 | + } %} |
| 54 | + |
| 55 | + {% set index = index + 1 %} |
| 56 | + {% endfor %} |
| 57 | + {% endif %} |
| 58 | + {% if entry.classes[0] is defined %} |
| 59 | + {% for element in entry.classes|sort_asc %} |
| 60 | + {% include 'components/menu-entry.html.twig' with { |
| 61 | + title: element.name|shortFQSEN, |
| 62 | + nav_id: nav_id ~ '-' ~ index, |
| 63 | + entry: element, |
| 64 | + expanded: false, |
| 65 | + icon: 'file.svg', |
| 66 | + } %} |
| 67 | + |
| 68 | + {% set index = index + 1 %} |
| 69 | + {% endfor %} |
| 70 | + {% endif %} |
| 71 | + {% if entry.traits[0] is defined %} |
| 72 | + {% for element in entry.traits|sort_asc %} |
| 73 | + {% include 'components/menu-entry.html.twig' with { |
| 74 | + title: element.name|shortFQSEN, |
| 75 | + nav_id: nav_id ~ '-' ~ index, |
| 76 | + entry: element, |
| 77 | + expanded: false, |
| 78 | + icon: 'file.svg', |
| 79 | + } %} |
| 80 | + |
| 81 | + {% set index = index + 1 %} |
| 82 | + {% endfor %} |
| 83 | + {% endif %} |
| 84 | + {% if entry.enums[0] is defined %} |
| 85 | + {% for element in entry.enums|sort_asc %} |
| 86 | + {% include 'components/menu-entry.html.twig' with { |
| 87 | + title: element.name|shortFQSEN, |
| 88 | + nav_id: nav_id ~ '-' ~ index, |
| 89 | + entry: element, |
| 90 | + expanded: false, |
| 91 | + icon: 'file.svg', |
| 92 | + } %} |
| 93 | + |
| 94 | + {% set index = index + 1 %} |
| 95 | + {% endfor %} |
| 96 | + {% endif %} |
| 97 | + </ul> |
| 98 | + {% endif %} |
| 99 | +{% endif %} |
0 commit comments