Created
July 16, 2015 16:54
-
-
Save kdes70/3fe5ad604f9be928201f to your computer and use it in GitHub Desktop.
Yii2 Рендер категорий выподающем списке в виде дерева
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?=$form->field($offer, 'categories_list')->dropDownList( | |
ArrayHelper::map($categories,'id',function($value){ return str_repeat('-',count(explode('.',$value->path) )) . $value->name ;} ), | |
['multiple' => true]); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment