Warning: You are browsing the documentation for PrestaShop 8, which is outdated.
You might want to read an updated version of this page for the current version, PrestaShop 9. Read the updated 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,
])