예제 #1
0
 /**
  * Create a new AnewtFormControlChoice instance.
  *
  * \param $name
  *   The name of this control.
  */
 function __construct($name)
 {
     parent::__construct($name);
     $this->_seed(array('multiple' => false, 'threshold' => 7, 'size' => null));
 }
예제 #2
0
 /**
  * Create a new base text control.
  *
  * This constructor must be called from subclass constructors, e.g.
  * AnewtFormControlText, AnewtFormControlTextMultiline, and
  * AnewtFormControlPassword.
  *
  * \param $name
  *   The name of this control.
  */
 function __construct($name)
 {
     parent::__construct($name);
     $this->_seed(array('multiline' => false, 'password' => false, 'value' => '', 'size' => null, 'maxlength' => null, 'rows' => 5, 'columns' => 72, 'show-value' => true));
 }
예제 #3
0
 /**
  * Create a new file upload control.
  *
  * \param $name
  *   The name of this control.
  *
  * \param $uploaddir
  *   The directory to upload the files to.
  */
 function __construct($name, $uploaddir)
 {
     parent::__construct($name);
     $this->_seed(array('value' => '', 'size' => null, 'maxlength' => null, 'max_file_size' => null, 'uploaddir' => $uploaddir, 'show-img-preview' => false, 'show-link-preview' => false, 'preview-dir' => false, 'add-timestamp' => false, 'ensure-unique' => true, 'remove-label' => '', 'delete-on-change' => false));
 }
예제 #4
0
 /**
  * \protected
  *
  * Create a new base button.
  *
  * This constructor must be called from subclass constructors, e.g.
  * AnewtFormControlButtonSubmit and AnewtFormControlButtonReset
  *
  * \param $name
  *   The name of this control.
  */
 function __construct($name)
 {
     parent::__construct($name);
     $this->_seed(array('input-type' => 'button', 'extra-class' => 'button-normal', 'can-be-filled' => false, 'render-name' => true));
 }