Exemplo n.º 1
0
 /**
  * Checkbox filter constructor
  *
  * @param string $name Name for the filter instance
  * @param string $label Label to the left of the checkbox
  * @param string $rightlabel Label to the right of the checkbox
  * @param int $default The default state of the checkbox (0, 1)
  * @param array $checkedsql SQL to use when checked
  * @param array $uncheckedsql SQL to use when not checked
  * @param bool $advanced Whether or not the form element should be an advanced option
  * @param string $field The field to be used in the filter
  */
 public function __construct($name, $label, $rightlabel = '', $default = 0, $checkedsql = array(), $uncheckedsql = array(), $advanced = false, $field = NULL)
 {
     parent::__construct($name, $label, $advanced, $field);
     $this->rightlabel = $rightlabel;
     $this->default = $default;
     $this->checkedsql = $checkedsql;
     $this->uncheckedsql = $uncheckedsql;
 }
Exemplo n.º 2
0
 /**
  * HTML "filter" constructor
  *
  * @param string $name - name for the filter instance
  * @param string $html - html to be added to the form
  */
 public function __construct($name, $html)
 {
     parent::__construct($name, null, false, '');
     $this->html = $html;
 }
Exemplo n.º 3
0
 /**
  * Adding an options param for the select options
  */
 public function __construct($name, $label, $options, $defaults = array(), $advanced = false, $field = NULL)
 {
     parent::__construct($name, $label, $advanced, $field);
     $this->options = $options;
     $this->defaults = $defaults;
 }
Exemplo n.º 4
0
 /**
  * Construct
  *
  * @param string $name Filter name
  * @param string $label Filter label
  * @param bool $advanced Filter advanced form setting
  * @param string $field SQL field, defaults to $name
  * @param array $attributes
  */
 public function __construct($name, $label, $advanced = false, $field = NULL, $attributes = array())
 {
     $this->attributes = $attributes;
     parent::__construct($name, $label, $advanced, $field);
 }
Exemplo n.º 5
0
 /**
  * Header "filter" constructor
  *
  * @param string $name - name for the filter instance
  * @param string $label - label to the left of the checkbox
  */
 public function __construct($name, $label)
 {
     parent::__construct($name, $label, false, '');
 }
Exemplo n.º 6
0
 /**
  * Construct
  *
  * @param string $name Filter name
  * @param string $label Filter label
  * @param bool $advanced Filter advanced form setting
  * @param string $field SQL field, defaults to $name
  * @param int $lv_default Low value default
  * @param int $hv_default High value default
  */
 public function __construct($name, $label, $advanced = false, $field = NULL, $lv_default = 0, $hv_default = 0)
 {
     parent::__construct($name, $label, $advanced, $field);
     $this->lv_default = $lv_default;
     $this->hv_default = $hv_default;
 }