/** * @param string $resource */ public function __construct($resource) { parent::__construct($resource); $this->session->access->delete = true; $db = Combine\Registry::getDbConnection(); $this->db = $db->getAdapter(); }
/** * @param string $resource */ public function __construct($resource) { $this->resource = $resource; $this->lang = Registry::getLanguage(); $this->theme_src = Registry::getThemeSrc(); $this->theme_location = Registry::getThemeLocation(); $this->current_page = isset($_GET["_page_{$this->resource}"]) && $_GET["_page_{$this->resource}"] > 0 ? (int) $_GET["_page_{$this->resource}"] : 1; $this->session = new SessionNamespace($this->resource); if (!isset($this->session->access)) { $this->session->access = new \stdClass(); } if (!isset($this->session->db)) { $this->session->db = new \stdClass(); } if (!isset($this->session->table)) { $this->session->table = new \stdClass(); } if (isset($this->session->table)) { // Количество записей if (isset($this->session->table->records_per_page)) { $this->records_per_page = $this->session->table->records_per_page; $this->records_per_page = $this->records_per_page === 0 ? 1000000000 : $this->records_per_page; } // Поисковые данные if (isset($this->session->table->search)) { $this->sessData['search'] = $this->session->table->search; } // Сортировка if (isset($this->session->table->order) && isset($this->session->table->order_type)) { $this->sessData['order'] = $this->session->table->order; $this->sessData['order_type'] = $this->session->table->order_type; } } }
/** * @param string $title */ public function __construct($title) { if (!empty($title)) { $this->attributes['value'] = $title; } $this->theme_location = Registry::getThemeLocation(); $this->theme_src = Registry::getThemeSrc(); }
/** * @param string $resource * @param string $url */ public function __construct($resource, $url) { $this->theme_src = Registry::getThemeSrc(); $this->theme_location = Registry::getThemeLocation(); $this->resource = $resource; $this->url = $url; if (isset($_GET[$this->resource])) { $this->active_tab = $_GET[$this->resource]; } }
/** * @param string $label * @param string $name */ public function __construct($label, $name = '') { $this->label = $label; if (!empty($name)) { $this->attributes['name'] = $name; } $this->lang = Registry::getLanguage(); $this->theme_src = Registry::getThemeSrc(); $this->theme_location = Registry::getThemeLocation(); }
/** * @param string $name * @param string $value * @param string $active_value * @param string $inactive_value * @param bool $default */ public function __construct($name, $value, $active_value, $inactive_value, $default = true) { $this->setAttr('name', $name); $this->setAttr('value', $value); $this->active_value = $active_value; $this->inactive_value = $inactive_value; $this->default = $default; $this->theme_location = Registry::getThemeLocation(); $this->theme_src = Registry::getThemeSrc(); }
/** * @param string $resource */ public function __construct($resource) { $this->resource = $resource; $this->lang = Registry::getLanguage(); $this->theme_src = Registry::getThemeSrc(); $this->theme_location = Registry::getThemeLocation(); $this->session = new SessionNamespace($this->resource); if (!isset($this->session->form)) { $this->session->form = new \stdClass(); } }
/** * @param string $resource */ public function __construct($resource) { $this->resource = $resource; $this->theme_src = Registry::getThemeSrc(); $this->theme_location = Registry::getThemeLocation(); }
public function __construct() { $this->resource = !empty($_SERVER['HTTP_X_CMB_RESOURCE']) ? $_SERVER['HTTP_X_CMB_RESOURCE'] : ''; $this->process = !empty($_SERVER['HTTP_X_CMB_PROCESS']) ? $_SERVER['HTTP_X_CMB_PROCESS'] : ''; $this->db = Registry::getDbConnection()->getAdapter(); }
/** * @param string $resource */ public function __construct($resource) { parent::__construct($resource); $this->db = Registry::getDbConnection()->getAdapter(); $this->session->form->controls = array(); }