Beispiel #1
0
 function __construct($params)
 {
     self::$_msql = SafeMySQL::getInstance();
     $modelName = get_class($this);
     foreach ($modelName::$vars as $k => $v) {
         $this->{$k} = isset($params[$k]) ? $params[$k] : $v;
         if ($v === FALSE && $this->{$k} === FALSE) {
             $this->setErrors('Undefined params ' . $k);
         }
     }
 }
Beispiel #2
0
 function __construct($params)
 {
     parent::__construct($params);
     if (!$this->dataProvider) {
         echo '<br><br>' . __('no_data');
         return;
     }
     $this->getsetupLabels();
     $this->createRowData();
     $this->setupPk();
     $this->setupAction();
     $this->setupCheckedColumn();
     $this->createlines();
     $this->jsModel = ucfirst($this->controller);
 }
Beispiel #3
0
 function __construct($params)
 {
     parent::__construct($params);
     $this->url = AF::link(array($this->controller => $this->action));
     $params = $this->params;
     if (isset($params['page'])) {
         $this->page = $params['page'] < 1 ? 1 : (int) $params['page'];
         unset($params['page']);
     }
     $amp = $params ? '&' : '';
     $this->url .= http_build_query($params) . $amp . 'page=';
     if (isset($_POST['pagination_count_in_page_value']) && in_array($_POST['pagination_count_in_page_value'], self::$itemInPage)) {
         setcookie('pagination_count_in_page_value', $_POST['pagination_count_in_page_value']);
         $this->countInPage = $_POST['pagination_count_in_page_value'];
     } elseif (isset($_COOKIE['pagination_count_in_page_value']) && in_array($_COOKIE['pagination_count_in_page_value'], self::$itemInPage)) {
         $this->countInPage = $_COOKIE['pagination_count_in_page_value'];
     }
 }
Beispiel #4
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createMenu();
 }
Beispiel #5
0
 function __construct()
 {
     parent::__construct(func_get_arg(0));
     $this->getWidgetView();
     echo $this->render($this->tpl, array('paging' => $this->paging));
 }
Beispiel #6
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createDataPicker();
 }
Beispiel #7
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createBreadCrumbs();
 }