Example #1
0
 public function selectField($name, $label, $validator = '', $multiple = false, $extra = '')
 {
     parent::__construct($name, $label, '', $validator, $extra);
     $this->option = array();
     $this->optgroup = array();
     $this->multiple = $multiple;
 }
Example #2
0
 function __construct(formField $ff, $values = null)
 {
     $this->ff = $ff;
     $this->setValues($values);
     if ($this->ff->getRootElement()->hasAttribute('_ffg')) {
         //Нельзя создавать больше одного объекта для одного поля
         throw new Exception('Duplicate formFieldGallery object for "' . $this->ff->getName() . '" field');
     }
     $this->formats = array();
     $xml = $ff->getXML();
     $res = $xml->query('param', $ff->getRootElement());
     foreach ($res as $param) {
         $this->formats[] = $param->parentNode->removeChild($param);
     }
     $this->ff->getRootElement()->setAttribute('_ffg', '_ffg');
     $this->seTable('articles_images');
 }
 public function suggestselectField($callbackcontroller, $callbackfunction, $name, $label, $defaultValue = '', $validator = '', $extraparams = array(), $extra = '')
 {
     $this->callbackcontroller = $callbackcontroller;
     $this->callbackfunction = $callbackfunction;
     parent::__construct($name, $label, $defaultValue, $validator, $extra);
     $this->option = array();
     $this->optgroup = array();
     $this->multiple = true;
     $this->extraparams = $extraparams;
 }
 public function checkboxgroupField($name, $label, $boxes, $extra = '')
 {
     $this->boxes = $boxes;
     foreach ($boxes as $id => $box) {
         if ($box['selected']) {
             $value[] = $id;
         }
     }
     parent::formField($name, $label, $value, $validator, $extra);
 }
Example #5
0
 public function __construct($name, $label, $defaultValue = '', $validator = '', $extra = '')
 {
     $defaultValue = $defaultValue == '' ? time() : $defaultValue;
     parent::__construct($name, $label, $defaultValue, $validator, $extra);
 }
Example #6
0
 public function passwordField($name, $label = '', $validator = '', $extra = '')
 {
     parent::__construct($name, $label, '', $validator, $extra);
 }
Example #7
0
 static function create($fieldName, $label = null, $uri = null)
 {
     return parent::create('field', 'select', $fieldName, $label, $uri);
 }
Example #8
0
 public function __construct($name, $value)
 {
     parent::__construct($name, $value);
     $this->setSelected();
     $this->value = type::super($name, '', $this->value);
 }
Example #9
0
 public function __construct($name, $value, $attributes = [])
 {
     parent::__construct($name, $value, $attributes);
     $this->setChecked();
 }
Example #10
0
 public function suggesttextField($callbackcontroller, $callbackfunction, $name, $label, $defaultValue = '', $validator = '', $extra = '')
 {
     $this->callbackcontroller = $callbackcontroller;
     $this->callbackfunction = $callbackfunction;
     parent::__construct($name, $label, $defaultValue, $validator, $extra);
 }
Example #11
0
 public function checkboxField($name, $label, $value, $selected = false, $validator = '', $extra)
 {
     $this->selected = $selected;
     parent::formField($name, $label, $value, $validator, $extra);
 }
Example #12
0
 public function __construct($name, $value)
 {
     parent::__construct($name, $value);
     $this->value = type::super($name . '_id', '', $this->value);
 }
Example #13
0
 function setValue($value)
 {
     parent::setValue($value);
     //$this->getRootElement()->setAttribute('file','../'.$value);
     if ($path = $this->getPath()) {
         list($width, $height, $type, $attr) = getimagesize($path);
         if ($width) {
             $this->setWidth($width);
         }
         if ($height) {
             $this->setHeight($height);
         }
     }
     $ar = array();
     //vdump(is_file($path));
 }