示例#1
0
 public function __construct($type, $name, $title = 'Field', $required = true, $maxLength = 0)
 {
     parent::__construct($type, $name, $title);
     $this->setRequired($required);
     if ($maxLength) {
         $this->setProperty('enforceMaxLength', true);
         $this->setProperty('maxLength', $maxLength);
         $this->setProperty('xtype', $type);
     }
     //$this->setProperty('margins','0 5 0 0');
     $this->setProperty('margins', '5 5 0 0');
 }
示例#2
0
 function __construct($name = '--missing--', $label = '', $options = array())
 {
     if (!isset($options['static_instance'])) {
         $options['static_instance'] = false;
     }
     parent::__construct($name, $label, $options);
     if (!isset($options['action_url']) && !$options['static_instance']) {
         throw new Exception('action_url option is required');
     }
 }
示例#3
0
 public function __construct($type, $name, $title = 'Field', $size = null)
 {
     parent::__construct($type, $name, $title);
     $this->setSize($size);
 }