|
@@ -536,7 +536,11 @@ $repo = $em->getRepository('Entity\Category');
|
|
$htmlTree = $repo->childrenHierarchy(
|
|
$htmlTree = $repo->childrenHierarchy(
|
|
null, /* starting from root nodes */
|
|
null, /* starting from root nodes */
|
|
false, /* load all children, not only direct */
|
|
false, /* load all children, not only direct */
|
|
- array('decorate' => true)
|
|
|
|
|
|
+ true, /* render html */
|
|
|
|
+ array(
|
|
|
|
+ 'decorate' => true,
|
|
|
|
+ 'representationField' => 'slug'
|
|
|
|
+ )
|
|
);
|
|
);
|
|
```
|
|
```
|
|
|
|
|
|
@@ -547,6 +551,7 @@ $htmlTree = $repo->childrenHierarchy(
|
|
$repo = $em->getRepository('Entity\Category');
|
|
$repo = $em->getRepository('Entity\Category');
|
|
$options = array(
|
|
$options = array(
|
|
'decorate' => true,
|
|
'decorate' => true,
|
|
|
|
+ 'representationField' => 'slug',
|
|
'rootOpen' => '<ul>',
|
|
'rootOpen' => '<ul>',
|
|
'rootClose' => '</ul>',
|
|
'rootClose' => '</ul>',
|
|
'childOpen' => '<li>',
|
|
'childOpen' => '<li>',
|
|
@@ -558,6 +563,7 @@ $options = array(
|
|
$htmlTree = $repo->childrenHierarchy(
|
|
$htmlTree = $repo->childrenHierarchy(
|
|
null, /* starting from root nodes */
|
|
null, /* starting from root nodes */
|
|
false, /* load all children, not only direct */
|
|
false, /* load all children, not only direct */
|
|
|
|
+ true, /* render html */
|
|
$options
|
|
$options
|
|
);
|
|
);
|
|
```
|
|
```
|