@@ -73,26 +73,51 @@ public function prepareRules(IFilter $objFilter, $arrFilterUrl)
7373
7474 /**
7575 * {@inheritdoc}
76+ *
77+ * @SuppressWarnings(PHPMD.Superglobals)
78+ * @SuppressWarnings(PHPMD.CamelCaseVariableName)
7679 */
7780 public function getParameterDCA ()
7881 {
7982 // If defined as static, return nothing as not to be manipulated via editors.
8083 if (!$ this ->get ('predef_param ' )) {
81- return array () ;
84+ return [] ;
8285 }
8386
8487 $ objAttribute = $ this ->getMetaModel ()->getAttributeById ($ this ->get ('attr_id ' ));
8588
86- return array (
87- $ this ->getParamName () => array
88- (
89- 'label ' => array (
90- ($ this ->get ('label ' ) ? $ this ->get ('label ' ) : $ objAttribute ->getName ()),
91- 'GET: ' .$ this ->get ('urlparam ' )
92- ),
89+ if ($ this ->get ('ynmode ' ) == 'radio ' ) {
90+ return [
91+ $ this ->getParamName () => [
92+ 'label ' => [
93+ ($ this ->get ('label ' ) ? $ this ->get ('label ' ) : $ objAttribute ->getName ()),
94+ 'GET: ' .$ this ->get ('urlparam ' )
95+ ],
96+ 'inputType ' => 'radio ' ,
97+ 'options ' => [
98+ '-1 ' => '-1 ' ,
99+ '1 ' => '1 '
100+ ],
101+ 'reference ' => [
102+ '-1 ' => $ GLOBALS ['TL_LANG ' ]['MSC ' ]['no ' ],
103+ '1 ' => $ GLOBALS ['TL_LANG ' ]['MSC ' ]['yes ' ]
104+ ],
105+ 'eval ' => [
106+ 'includeBlankOption ' => $ this ->get ('blankoption ' )
107+ ]
108+ ]
109+ ];
110+ }
111+
112+ return [
113+ $ this ->getParamName () => [
114+ 'label ' => [
115+ ($ this ->get ('label ' ) ? $ this ->get ('label ' ) : $ objAttribute ->getName ()),
116+ 'GET: ' .$ this ->get ('urlparam ' )
117+ ],
93118 'inputType ' => 'checkbox ' ,
94- )
95- ) ;
119+ ]
120+ ] ;
96121 }
97122
98123 /**
0 commit comments