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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user