/** * 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); } }
/** * 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'; } }
/** * Arguments: * - cmd * - label * - x123 (optional) as number of lines * - ^ (optional) */ public function initialize($args) { parent::initialize($args); $this->opt['class'] .= ' textareafield'; }
/** * 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; }