| @@ 235-246 (lines=12) @@ | ||
| 232 | * |
|
| 233 | * @return string |
|
| 234 | */ |
|
| 235 | public function getTree($separator = '/') |
|
| 236 | { |
|
| 237 | $tree = ''; |
|
| 238 | ||
| 239 | $current = $this; |
|
| 240 | do { |
|
| 241 | $tree = $current->getSlug().$separator.$tree; |
|
| 242 | $current = $current->getParent(); |
|
| 243 | } while ($current); |
|
| 244 | ||
| 245 | return trim($tree, $separator); |
|
| 246 | } |
|
| 247 | ||
| 248 | /** |
|
| 249 | * @ORM\PrePersist() |
|
| @@ 468-479 (lines=12) @@ | ||
| 465 | * |
|
| 466 | * @return string |
|
| 467 | */ |
|
| 468 | public function getTree($separator = '/') |
|
| 469 | { |
|
| 470 | $tree = ''; |
|
| 471 | ||
| 472 | $current = $this; |
|
| 473 | do { |
|
| 474 | $tree = $current->getSlug().$separator.$tree; |
|
| 475 | $current = $current->getParent(); |
|
| 476 | } while ($current); |
|
| 477 | ||
| 478 | return trim($tree, $separator); |
|
| 479 | } |
|
| 480 | ||
| 481 | /** |
|
| 482 | * @ORM\PrePersist() |
|