2626
2727namespace MetaModels \FilterCheckboxBundle \FilterSetting ;
2828
29+ use Contao \StringUtil ;
2930use MetaModels \Attribute \IAttribute ;
3031use MetaModels \Filter \IFilter ;
3132use 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