Ejemplo n.º 1
0
 public function __construct($spec, $options = array())
 {
     $options = array_merge($options, array('disableLoadDefaultDecorators' => true));
     parent::__construct($spec, $options);
     $this->_decorator = new Monkeys_Form_Decorator_Composite();
     $this->addDecorator($this->_decorator);
 }
Ejemplo n.º 2
0
 public function __construct($spec, $aOptions = array())
 {
     if (isset($aOptions['ajax'])) {
         $this->_ajax = $aOptions['ajax'];
         unset($aOptions['ajax']);
     }
     parent::__construct($spec, $aOptions);
 }
 public function __construct($spec = null, $options = null, $required = false)
 {
     parent::__construct($spec, $options);
     $this->setLabel($options['label'])->setRequired($required)->setAttrib('class', $options['class'])->addValidator('Alnum')->setDescription(isset($options['desc']) ? $options['desc'] : null)->addValidator('StringLength', false, array(6, 256));
     if (isset($options['removeDecorators'])) {
         $this->removeDecorator('HtmlTag')->removeDecorator('Label');
     } else {
         $this->setDecorators(array(new vkNgine_Form_Element_Decorator_Text()));
     }
 }
Ejemplo n.º 4
0
 /**
  * Contructeur, prend le nom interne, le titre et la description du champ.
  * 
  * @param string $internalName
  * @param string $label
  * @param string $description
  */
 public function __construct($internalName, $label, $description)
 {
     parent::__construct($internalName);
     $this->setLabel($label)->setDescription($description);
     $this->setAttrib('size', '32')->addValidator('stringLength', false, array(6, 32))->addFilter('StripTags');
 }
Ejemplo n.º 5
0
 /**
  * Constructor
  *
  * $spec may be:
  * - string: name of element
  * - array: options with which to configure element
  * - \Zend_Config: \Zend_Config with options for configuring element
  *
  * @param  string|array|\Zend_Config $spec
  * @param  array|\Zend_Config $options
  * @return void
  * @throws \Zend_Form_Exception if no element name after initialization
  */
 public function __construct($spec, $options = null)
 {
     parent::__construct($spec, $options);
     $this->addClass($this->_elementClass);
 }