コード例 #1
0
 public function __construct()
 {
     $this->pageTitle = 'Reports';
     parent::__construct();
     // As we're local, we just call the class report with suppress set to true, which will prevent
     // it from writing to the screen.
     $this->repServ = new ReportEngine($this->get_allowed_website_id_list('editor'));
 }
コード例 #2
0
 public function __construct($modelname, $viewname = NULL, $controllerpath = NULL, $gridId = NULL)
 {
     $this->model = ORM::factory($modelname);
     $this->modelname = $modelname;
     $this->viewname = is_null($viewname) ? "{$modelname}/index" : $viewname;
     $this->controllerpath = is_null($controllerpath) ? $modelname : $controllerpath;
     $this->gridId = $gridId;
     $this->base_filter = array();
     $this->auth_filter = null;
     $this->pagetitle = "Abstract gridview class - override this title!";
     parent::__construct();
 }
コード例 #3
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
 }
コード例 #4
0
 public function save()
 {
     // Build the validation_rules field from the set of controls that are associated with it.
     $rules = array();
     foreach (array('required', 'alpha', 'email', 'url', 'alpha_numeric', 'numeric', 'standard_text', 'date_in_past', 'time', 'digit', 'integer') as $rule) {
         if (array_key_exists('valid_' . $rule, $_POST) && $_POST['valid_' . $rule] == 1) {
             array_push($rules, $rule);
         }
     }
     if (array_key_exists('valid_length', $_POST) && $_POST['valid_length'] == 1) {
         $rules[] = 'length[' . $_POST['valid_length_min'] . ',' . $_POST['valid_length_max'] . ']';
     }
     if (array_key_exists('valid_decimal', $_POST) && $_POST['valid_decimal'] == 1) {
         $rules[] = 'decimal[' . $_POST['valid_dec_format'] . ']';
     }
     if (array_key_exists('valid_regex', $_POST) && $_POST['valid_regex'] == 1) {
         $rules[] = 'regex[' . $_POST['valid_regex_format'] . ']';
     }
     if (array_key_exists('valid_min', $_POST) && $_POST['valid_min'] == 1) {
         $rules[] = 'minimum[' . $_POST['valid_min_value'] . ']';
     }
     if (array_key_exists('valid_max', $_POST) && $_POST['valid_max'] == 1) {
         $rules[] = 'maximum[' . $_POST['valid_max_value'] . ']';
     }
     $_POST['validation_rules'] = implode("\r\n", $rules);
     parent::save();
 }
コード例 #5
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->tableNames = array_keys($this->tableMetadata);
 }