Ejemplo n.º 1
0
 /**
  * Initialize the appropriate column
  *
  * @param array $args
  */
 public function initialize($args)
 {
     parent::initialize($args);
     // find the column
     try {
         $this->column = $this->findColumn($this->opt['label']);
     } catch (StructException $e) {
         msg(hsc($e->getMessage()), -1);
     }
 }
Ejemplo n.º 2
0
 /**
  * Arguments:
  *  - cmd
  *  - label
  *  - ^ (optional)
  *
  * @param array $args The tokenized definition, only split at spaces
  */
 function initialize($args)
 {
     parent::initialize($args);
     $attr = array();
     if (!isset($this->opt['optional'])) {
         $attr['required'] = 'required';
     }
     $this->tpl = form_makeFileField('@@NAME@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@', $attr);
     if (!isset($this->opt['optional'])) {
         $this->tpl['class'] .= ' required';
     }
 }
Ejemplo n.º 3
0
 /**
  * Arguments:
  *  - cmd
  *  - label
  *  - x123 (optional) as number of lines
  *  - ^ (optional)
  */
 public function initialize($args)
 {
     parent::initialize($args);
     $this->opt['class'] .= ' textareafield';
 }
Ejemplo n.º 4
0
 /**
  * Arguments:
  *  - cmd
  *  - wiki text
  *
  * @param array $args The tokenized definition, only split at spaces
  */
 public function initialize($args)
 {
     parent::initialize($args);
     // make always optional to prevent being marked as required
     $this->opt['optional'] = true;
 }