Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
category.php
1<?php
3
9{
18 public static function getOptionsTree($categories, $options = array(), $depth = 0)
19 {
20
21 $prefix = str_repeat('-', $depth);
22 $depth++;
23
24 foreach ($categories as $category)
25 {
26 $options[$category->getKey()] = $prefix . $category->getLabel();
27 $options = self::getOptionsTree($category->children, $options, $depth);
28 }
29
30 return $options;
31 }
32}
static getOptionsTree($categories, $options=array(), $depth=0)
Definition category.php:18