feat(main): Small adjustments
Css adjustments for certain blocks; module instructions compliance
This commit is contained in:
@@ -20,10 +20,17 @@ final class CustomHtmlGroupChoiceProvider implements
|
||||
ORDER BY `title` ASC'
|
||||
);
|
||||
|
||||
$titleCounts = array_count_values(array_column($groups, 'title'));
|
||||
$choices = [];
|
||||
|
||||
foreach ($groups as $group) {
|
||||
$choices[$group['title']] = (int) $group['id_ws_customhtml_group'];
|
||||
$label = $group['title'];
|
||||
|
||||
if ($titleCounts[$label] > 1) {
|
||||
$label .= ' (#' . $group['id_ws_customhtml_group'] . ')';
|
||||
}
|
||||
|
||||
$choices[$label] = (int) $group['id_ws_customhtml_group'];
|
||||
}
|
||||
|
||||
return $choices;
|
||||
|
||||
@@ -22,7 +22,6 @@ class CustomHtmlBlockType extends AbstractType
|
||||
|
||||
public function __construct(
|
||||
TranslatorInterface $translator,
|
||||
array $locales,
|
||||
ConfigurableFormChoiceProviderInterface $groupChoiceProvider
|
||||
) {
|
||||
$this->translator = $translator;
|
||||
|
||||
@@ -12,7 +12,7 @@ class CustomHtmlGroupType extends AbstractType
|
||||
{
|
||||
private $translator;
|
||||
|
||||
public function __construct(TranslatorInterface $translator, array $locales)
|
||||
public function __construct(TranslatorInterface $translator)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
@@ -11,13 +11,6 @@ use PrestaShop\PrestaShop\Core\Grid\Search\SearchCriteriaInterface;
|
||||
|
||||
final class CustomHtmlBlockQueryBuilder extends AbstractDoctrineQueryBuilder
|
||||
{
|
||||
private $searchCriteriaApplicator;
|
||||
private $contextLanguageId;
|
||||
private $contextShopId;
|
||||
private $contextShopGroupId;
|
||||
private $filterApplicator;
|
||||
private $configuration;
|
||||
|
||||
public function __construct(
|
||||
Connection $connection,
|
||||
string $dbPrefix,
|
||||
@@ -29,12 +22,6 @@ final class CustomHtmlBlockQueryBuilder extends AbstractDoctrineQueryBuilder
|
||||
Configuration $configuration
|
||||
) {
|
||||
parent::__construct($connection, $dbPrefix);
|
||||
$this->searchCriteriaApplicator = $searchCriteriaApplicator;
|
||||
$this->contextLanguageId = $contextLanguageId;
|
||||
$this->contextShopId = $contextShopId;
|
||||
$this->contextShopGroupId = $contextShopGroupId;
|
||||
$this->filterApplicator = $filterApplicator;
|
||||
$this->configuration = $configuration;
|
||||
}
|
||||
|
||||
public function getSearchQueryBuilder(SearchCriteriaInterface $searchCriteria)
|
||||
|
||||
@@ -11,13 +11,6 @@ use PrestaShop\PrestaShop\Core\Grid\Search\SearchCriteriaInterface;
|
||||
|
||||
final class CustomHtmlGroupQueryBuilder extends AbstractDoctrineQueryBuilder
|
||||
{
|
||||
private $searchCriteriaApplicator;
|
||||
private $contextLanguageId;
|
||||
private $contextShopId;
|
||||
private $contextShopGroupId;
|
||||
private $filterApplicator;
|
||||
private $configuration;
|
||||
|
||||
public function __construct(
|
||||
Connection $connection,
|
||||
string $dbPrefix,
|
||||
@@ -29,12 +22,6 @@ final class CustomHtmlGroupQueryBuilder extends AbstractDoctrineQueryBuilder
|
||||
Configuration $configuration
|
||||
) {
|
||||
parent::__construct($connection, $dbPrefix);
|
||||
$this->searchCriteriaApplicator = $searchCriteriaApplicator;
|
||||
$this->contextLanguageId = $contextLanguageId;
|
||||
$this->contextShopId = $contextShopId;
|
||||
$this->contextShopGroupId = $contextShopGroupId;
|
||||
$this->filterApplicator = $filterApplicator;
|
||||
$this->configuration = $configuration;
|
||||
}
|
||||
|
||||
public function getSearchQueryBuilder(SearchCriteriaInterface $searchCriteria)
|
||||
|
||||
Reference in New Issue
Block a user