示例#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);
         }
     }
 }
示例#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);
 }
示例#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'];
     }
 }
示例#4
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createMenu();
 }
示例#5
0
 function __construct()
 {
     parent::__construct(func_get_arg(0));
     $this->getWidgetView();
     echo $this->render($this->tpl, array('paging' => $this->paging));
 }
示例#6
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createDataPicker();
 }
示例#7
0
 public function __construct($params)
 {
     parent::__construct($params);
     $this->createBreadCrumbs();
 }