Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit a329f4f9 authored by Nicolas's avatar Nicolas
Browse files

Corrections : Affichage des sous-catégories

parent 3049b0d0
No related branches found
No related tags found
No related merge requests found
......@@ -51,16 +51,20 @@ class CategoryList implements ArrayInterface
*/
public function toArray()
{
/*
* Le paramètre asCollection permet à true d'afficher le second niveau des catégories
*/
$categories = $this->getStoreCategories(true,false,true);
$categories = $this->getStoreCategories(false,true,true);
$categoryList = array();
$catagoryList = array();
foreach ($categories as $category){
$catagoryList[$category->getEntityId()] = __($category->getName());
$categoryList[$category->getEntityId()] = __($category->getName());
}
return $catagoryList;
return $categoryList;
}
}
?>
\ No newline at end of file
......@@ -11,7 +11,7 @@
<parameter name="widget_content" xsi:type="text" visible="true" sort_order="2">
<label translate="true">content</label>
</parameter>
<parameter name="category_selection" xsi:type="multiselect" visible="true" sort_order="3" source_model="NicolasBejean\CategoryWidget\Model\Config\Source\CategoryList">
<parameter name="category_selection" xsi:type="multiselect" visible="true" sort_order="3" source_model="NicolasBejean\CategoryWidget\Model\Config\Source\CategoryList">
<label translate="true">category_selection</label>
<description translate="true">category_selection_description</description>
</parameter>
......
......@@ -22,10 +22,6 @@
<?php if($categories != null): ?>
<div class="categories">
<?php
/*
* TODO : Supprimer le foreach lorsqu'il n'y a qu'un enfant
* TODO : Permettre d'afficher plusieurs fois la même catégorie
*/
foreach($categories as $category):
$cat = $this->getCategoryModel($category->getId());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment