/** * Method to set certain otherwise inaccessible properties of the form field object. * * @param string $name The property name for which to the the value. * @param mixed $value The value of the property. * * @return void * * @since 3.2 */ public function __set($name, $value) { switch ($name) { case 'keyField': case 'valueField': case 'translate': case 'query': $this->{$name} = (string) $value; break; default: parent::__set($name, $value); } }
/** * Method to set certain otherwise inaccessible properties of the form field object. * * @param string $name The property name for which to the the value. * @param mixed $value The value of the property. * * @return void * * @since 1.2.0 && J3.2 */ public function __set($name, $value) { switch ($name) { case 'parentField': $this->{$name} = (string) $value; break; case 'checked': $value = (string) $value; $this->{$name} = array_map('trim', explode(',', $value)); break; case 'states': $this->{$name} = explode(',', (string) $value); JArrayHelper::toInteger($this->{$name}); break; /* @deprecated >= J3.2 */ /* @deprecated >= J3.2 */ case 'class': // Removes spaces from left & right and extra spaces from middle $value = preg_replace('/\\s+/', ' ', trim((string) $value)); $this->{$name} = (string) $value; break; default: if (FieldsandfiltersFactory::isVersion('>=', 3.2)) { parent::__set($name, $value); } break; /* @end deprecated >= J3.2 */ } }