Exemple #1
0
 /**
  * @brief	Constructeur de classe
  *
  *
  * @author	francoisespinet
  * @version 1 mars 2012 - 11:58:44
  */
 function __construct()
 {
     //appel du constructeur du parent
     parent::__construct($this->id);
     //ajout du validateur
     $this->addValidator(new Projet_Validate_Trigramme());
 }
Exemple #2
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);
 }
Exemple #3
0
 /**
  * Constructor figures out which type of input to render
  * @param $spec
  * @param $options
  * @return Void
  */
 public function __construct($spec, $options = null)
 {
     if (empty($options['type'])) {
         $options['type'] = $this->_getType();
     }
     parent::__construct($spec, $options);
 }
Exemple #4
0
 /**
  * Constructor that takes into account the type given, if given
  * Proxies its parent constructor to provide rest of functionality
  *
  * @param $spec
  * @param $options
  * @uses Zend_Form_Element
  */
 public function __construct($spec, $options = null)
 {
     if ($this->_isHtml5() && !isset($options['type'])) {
         $options['type'] = $this->_getType($spec);
     }
     parent::__construct($spec, $options);
 }
 public function __construct($spec, $options = NULL)
 {
     if ($spec instanceof BuggyPress_Issue) {
         $this->_issue = $spec;
         $spec = self::FIELD_NAME;
     }
     parent::__construct($spec, $options);
 }
 /**
  * Contructeur, prend le nom interne, le titre et la description du champ.
  * Peut egalement prendre la valeur par defaut.
  * 
  * @param string $internalName
  * @param string $label
  * @param string $description
  * @param string $default
  */
 public function __construct($internalName, $label, $description, $default = false)
 {
     parent::__construct($internalName);
     $this->setLabel($label)->setDescription($description);
     if ($default !== false) {
         $this->setValue($default);
     }
     $this->setAttrib('size', '5')->addFilter('StripTags')->addValidator('Alnum');
 }
Exemple #7
0
 /**
  * Contructeur, prend le nom interne, le titre et la description du champ.
  * Peut egalement prendre la valeur par defaut.
  * 
  * @param string $internalName
  * @param string $label
  * @param string $description
  * @param string $default
  */
 public function __construct($internalName, $label, $description, $default = false)
 {
     parent::__construct($internalName);
     $this->setLabel($label)->setDescription($description);
     if ($default !== false) {
         $this->setValue($default);
     }
     $this->setAttrib('size', '32')->addValidator('stringLength', false, array(4, 32))->addFilters(array('StripTags', 'StringtoLower'));
 }
 public function __construct($spec, $options = null)
 {
     $this->_table = $options['table'];
     if (isset($options['field'])) {
         $this->_field = $options['field'];
     } else {
         $this->_field = 'nome';
     }
     parent::__construct($spec, $options);
 }
 public function __construct($spec, $options = null)
 {
     if (isset($options['format'])) {
         $this->_format = $options['format'];
         unset($options['format']);
     }
     if (isset($options['db_format'])) {
         $this->_db_format = $options['db_format'];
         unset($options['db_format']);
     }
     parent::__construct($spec, $options);
 }
Exemple #10
0
 public function __construct($spec, $aOptions = array())
 {
     if (isset($aOptions['ajax'])) {
         $this->_ajax = $aOptions['ajax'];
         unset($aOptions['ajax']);
     }
     if (isset($aOptions['deco'])) {
         $this->_deco = $aOptions['deco'];
         unset($aOptions['deco']);
     }
     parent::__construct($spec, $aOptions);
 }
 public function __construct($spec = null, $options = null, $required = false)
 {
     parent::__construct($spec, $options);
     $this->addFilter('StringTrim')->setRequired($required)->setLabel($options['label'])->setAttrib('class', $options['class'])->addValidator('StringLength', false, array(1, 255));
     if ($required && isset($options['notEmptyErrorMessage'])) {
         $this->addValidator('NotEmpty', false, array('messages' => $options['notEmptyErrorMessage']));
     }
     if (isset($options['value'])) {
         $this->setValue($options['value']);
     }
     if (isset($options['removeDecorators'])) {
         $this->removeDecorator('HtmlTag')->removeDecorator('Label');
     } else {
         $this->setDecorators(array(new vkNgine_Form_Element_Decorator_Text()));
     }
 }
Exemple #12
0
 public function __construct($spec, $options = null)
 {
     parent::__construct($spec, $options);
 }
Exemple #13
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);
 }
Exemple #14
0
 public function __construct($spec, $options = null)
 {
     $options = array_merge($options, $this->_defaultOptions);
     return parent::__construct($spec, $options);
 }