Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.
You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page
This form class is responsible for creating a category selector using a tree view
PrestaShopBundle\Form\Admin\Type
Option | Type | Default value | Description |
---|---|---|---|
label | boolean |
false |
|
choices | array |
||
list | array |
||
valid_list | array |
||
multiple | boolean |
true |
allows multi selection of categories |
Component | Description |
---|---|
../admin-dev/themes/default/js/bundle/category-tree.js | Responsible for category tree expanding and collapsing interactivity |
$builder->add('categories', ChoiceCategoriesTreeType::class, [
'label' => $this->translator->trans('Associated categories', [], 'Admin.Catalog.Feature'),
'list' => $this->nested_categories,
'valid_list' => $this->categories,
'multiple' => true,
])