Пример #1
0
 /**
  * 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 'checkedOptions':
             $this->checkedOptions = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #2
0
 /**
  * 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 'contentType':
             $this->contentType = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #3
0
 /**
  * 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 'accept':
             $this->{$accept} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #4
0
 /**
  * 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 'rows':
         case 'columns':
             $this->{$name} = (int) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #5
0
 /**
  * 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 'descriptionfield':
         case 'flagfield':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #6
0
 /**
  * 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 'plugin':
         case 'namespace':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #7
0
 /**
  * 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 'checked':
             $value = (string) $value;
             $this->{$name} = $value == 'true' || $value == $name || $value == '1';
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #8
0
 /**
  * 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 'step':
         case 'min':
         case 'max':
             $this->{$name} = (double) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #9
0
 /**
  * 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 'imagedir':
         case 'userstate':
         case 'side':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #10
0
 /**
  * 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 'section':
         case 'component':
         case 'assetField':
             $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   3.2
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'maxlength':
             $value = (int) $value;
         case 'format':
         case 'filter':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #12
0
 /**
  * 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 'latitudefield':
         case 'longitudefield':
         case 'width':
         case 'height':
         case 'lat':
         case 'lng':
         case 'zoom':
         case 'icon':
         case 'mapOnly':
             $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) {
         /* @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;
         case 'size':
             $this->{$name} = (int) $value;
             break;
         default:
             if (FieldsandfiltersFactory::isVersion('>=', 3.2)) {
                 parent::__set($name, $value);
             }
             break;
             /* @end deprecated >= J3.2 */
     }
 }
Пример #14
0
 /**
  * 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)
 {
     $value = (string) $value;
     switch ($name) {
         case 'maxLength':
         case 'threshold':
             $this->{$name} = $value;
             break;
         case 'meter':
             $this->meter = $value === 'true' || $value === $name || $value === '1';
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #15
0
 /**
  * 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.0.0
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'firstdayofweek':
             $value = (int) $value;
         case 'format':
         case 'language':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #16
0
 /**
  * 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 'maxLength':
             $this->maxLength = (int) $value;
             break;
         case 'dirname':
             $value = (string) $value;
             $value = $value == $name || $value == 'true' || $value == '1';
         case 'inputmode':
             $this->name = (string) $value;
             break;
         default:
             if (method_exists('JFormField', '__set')) {
                 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   3.6
  */
 public function __set($name, $value)
 {
     switch ($name) {
         case 'formsource':
             $this->formsource = (string) $value;
             // Add root path if we have a path to XML file
             if (strrpos($this->formsource, '.xml') === strlen($this->formsource) - 4) {
                 $this->formsource = JPath::clean(JPATH_ROOT . '/' . $this->formsource);
             }
             break;
         case 'min':
             $this->min = (int) $value;
             break;
         case 'max':
             if ($value) {
                 $this->max = max(1, (int) $value);
             }
             break;
         case 'groupByFieldset':
             if ($value !== null) {
                 $value = (string) $value;
                 $this->groupByFieldset = !($value === 'false' || $value === 'off' || $value === '0');
             }
             break;
         case 'layout':
             $this->layout = (string) $value;
             // Make sure the layout is not empty.
             if (!$this->layout) {
                 // Set default value depend from "multiple" mode
                 $this->layout = !$this->multiple ? 'joomla.form.field.subform.default' : 'joomla.form.field.subform.repeatable';
             }
             break;
         case 'buttons':
             if (!$this->multiple) {
                 $this->buttons = array();
                 break;
             }
             if ($value && !is_array($value)) {
                 $value = explode(',', (string) $value);
                 $value = array_fill_keys(array_filter($value), true);
             }
             if ($value) {
                 $value = array_merge(array('add' => false, 'remove' => false, 'move' => false), $value);
                 $this->buttons = $value;
             }
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #18
0
 /**
  * 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 'split':
             $value = (int) $value;
         case 'control':
         case 'format':
             $this->{$name} = (string) $value;
             break;
         case 'keywords':
             $this->{$name} = (string) $value;
             break;
         case 'exclude':
         case 'colors':
             $this->{$name} = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #19
0
 /**
  * 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 'authorField':
         case 'asset':
         case 'link':
         case 'preview':
         case 'directory':
             $this->{$name} = (string) $value;
             break;
         case 'previewWidth':
         case 'previewHeight':
             $this->{$name} = (int) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #20
0
 /**
  * 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 'maxLength':
             $this->maxLength = (int) $value;
             break;
         case 'dirname':
             $value = (string) $value;
             $value = $value == $name || $value == 'true' || $value == '1';
         case 'inputmode':
             $this->name = (string) $value;
             break;
         default:
             parent::__set($name, $value);
     }
 }