Skip to content

Commit 079142d

Browse files
committed
Merge branch 'hotfix/fix_eval_template' into 'feature/2.3.0'
Fix eval parameter for template See merge request metamodels/filter_checkbox!24
2 parents 16af803 + 7311e4c commit 079142d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FilterSetting/Checkbox.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
namespace MetaModels\FilterCheckboxBundle\FilterSetting;
2828

29+
use Contao\StringUtil;
2930
use MetaModels\Attribute\IAttribute;
3031
use MetaModels\Filter\IFilter;
3132
use MetaModels\Filter\Rules\SearchAttribute;
@@ -153,6 +154,7 @@ public function enableFEFilterWidget()
153154
*
154155
* @SuppressWarnings(PHPMD.Superglobals)
155156
* @SuppressWarnings(PHPMD.LongVariable)
157+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
156158
*/
157159
public function getParameterFilterWidgets(
158160
$arrIds,
@@ -164,6 +166,8 @@ public function getParameterFilterWidgets(
164166
$objAttribute = $this->getMetaModel()->getAttributeById((int) $this->get('attr_id'));
165167
assert($objAttribute instanceof IAttribute);
166168

169+
$cssID = StringUtil::deserialize($this->get('cssID'), true);
170+
167171
$arrWidget = [
168172
'label' => $this->prepareLabel($objAttribute),
169173
'inputType' => ($this->get('ynmode') === 'radio' ? 'radio' : 'checkbox'),
@@ -173,6 +177,8 @@ public function getParameterFilterWidgets(
173177
'ynmode' => $this->get('ynmode'),
174178
'ynfield' => $this->get('ynfield'),
175179
'template' => $this->get('template'),
180+
'cssID' => !empty($cssID[0]) ? ' id="' . $cssID[0] . '"' : '',
181+
'class' => !empty($cssID[1]) ? ' ' . $cssID[1] : '',
176182
'includeBlankOption' => ($this->get('ynmode') === 'radio' && $this->get('blankoption') ? true : false),
177183
]
178184
];

0 commit comments

Comments
 (0)