feat(main): Add FAQ accordion
This commit is contained in:
@@ -15,7 +15,9 @@ use PrestaShop\PrestaShop\Core\Grid\Filter\Filter;
|
||||
use PrestaShop\PrestaShop\Core\Grid\Filter\FilterCollection;
|
||||
use PrestaShop\PrestaShop\Core\Hook\HookDispatcherInterface;
|
||||
use PrestaShopBundle\Form\Admin\Type\SearchAndResetType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Websmid\CustomHtml\Config\Config;
|
||||
|
||||
final class CustomHtmlBlockGridDefinitionFactory extends AbstractGridDefinitionFactory
|
||||
{
|
||||
@@ -71,6 +73,11 @@ final class CustomHtmlBlockGridDefinitionFactory extends AbstractGridDefinitionF
|
||||
->setName($this->trans('Group', [], 'Modules.Wscustomhtml.Admin'))
|
||||
->setOptions(['field' => 'group_title'])
|
||||
)
|
||||
->add(
|
||||
(new DataColumn('type'))
|
||||
->setName($this->trans('Type', [], 'Modules.Wscustomhtml.Admin'))
|
||||
->setOptions(['field' => 'type'])
|
||||
)
|
||||
->add(
|
||||
(new DataColumn('active'))
|
||||
->setName($this->trans('Active', [], 'Admin.Global'))
|
||||
@@ -120,6 +127,15 @@ final class CustomHtmlBlockGridDefinitionFactory extends AbstractGridDefinitionF
|
||||
'attr' => ['placeholder' => $this->trans('Group', [], 'Modules.Wscustomhtml.Admin')],
|
||||
])
|
||||
)
|
||||
->add(
|
||||
(new Filter('type', ChoiceType::class))
|
||||
->setAssociatedColumn('type')
|
||||
->setTypeOptions([
|
||||
'required' => false,
|
||||
'choices' => array_flip(Config::BLOCK_TYPES),
|
||||
'placeholder' => $this->trans('All', [], 'Admin.Global'),
|
||||
])
|
||||
)
|
||||
->add(
|
||||
(new Filter('actions', SearchAndResetType::class))
|
||||
->setAssociatedColumn('actions')
|
||||
|
||||
Reference in New Issue
Block a user