File tree Expand file tree Collapse file tree 3 files changed +37
-3
lines changed
BusinessPageBundle/Entity Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Original file line number Diff line number Diff line change @@ -110,4 +110,21 @@ public function setAuthorRestricted($authorRestricted)
110
110
{
111
111
$ this ->authorRestricted = $ authorRestricted ;
112
112
}
113
+
114
+ /**
115
+ * Get inheritors (all Templates having this object as Template).
116
+ *
117
+ * @return [Template]
118
+ */
119
+ public function getTemplateInheritors ()
120
+ {
121
+ $ templateInheritors = [];
122
+ foreach ($ this ->inheritors as $ inheritor ) {
123
+ if ($ inheritor instanceof self) {
124
+ $ templateInheritors [] = $ inheritor ;
125
+ }
126
+ }
127
+
128
+ return $ templateInheritors ;
129
+ }
113
130
}
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ public function setInheritors($inheritors)
147
147
}
148
148
149
149
/**
150
- * Get inheritors (all Templates having this object as Template).
150
+ * Get inheritors (all Views having this object as Template).
151
151
*
152
152
* @return [Template]
153
153
*/
@@ -156,6 +156,23 @@ public function getInheritors()
156
156
return $ this ->inheritors ;
157
157
}
158
158
159
+ /**
160
+ * Get inheritors (all Templates having this object as Template).
161
+ *
162
+ * @return [Template]
163
+ */
164
+ public function getTemplateInheritors ()
165
+ {
166
+ $ templateInheritors = [];
167
+ foreach ($ this ->inheritors as $ inheritor ) {
168
+ if ($ inheritor instanceof self) {
169
+ $ templateInheritors [] = $ inheritor ;
170
+ }
171
+ }
172
+
173
+ return $ templateInheritors ;
174
+ }
175
+
159
176
/**
160
177
* @Assert\Callback(groups={"victoire"})
161
178
*/
Original file line number Diff line number Diff line change 13
13
{% macro templatesHierarchy(templates ) %}
14
14
{% for template in templates %}
15
15
<li id =" list_{{template .id }}" ><a href =" {{path(' victoire_template_show' , {' slug' : template .slug })}}" >{{ template .name }}</a >
16
- {% if template .inheritors %}
16
+ {% if template .templateInheritors %}
17
17
<ol >
18
- {{ _self.templatesHierarchy (template .inheritors ) }}
18
+ {{ _self.templatesHierarchy (template .templateInheritors ) }}
19
19
</ol >
20
20
{% endif %}
21
21
</li >
You can’t perform that action at this time.
0 commit comments