/** * Class constructor, initializes basic properties * * @param jqGridLoader $loader */ public function __construct(jqGridLoader $loader) { //------------------ // Globals //------------------ $this->grid_id = get_class($this); $this->loader = $loader; $this->input = $this->getInput(); $this->DB = $loader->loadDB(); $this->reserved_col_names = $this->getReservedColNames(); $this->render_data = $this->getRenderData(); //---------------- // Init //---------------- $this->beforeInit(); $this->init(); $this->afterInit(); //---------------- // Prepare columns //---------------- reset($this->cols); $this->primary_key = key($this->cols); foreach ($this->cols as $k => &$c) { $c = $this->initColumn($k, $c); } }
/** * Class constructor, initializes basic properties * * @param jqGridLoader $loader */ public function __construct(jqGridLoader $loader) { //------------------ // Globals //------------------ $this->grid_id = get_class($this); $this->Loader = $loader; $this->input = $this->getInput(); $this->DB = $loader->loadDB(); //---------------- // Init //---------------- $this->beforeInit(); $this->init(); $this->afterInit(); //---------------- // Primary key //---------------- reset($this->cols); $this->primary_key = $this->primary_key ? (array) $this->primary_key : array(key($this->cols)); if (is_null($this->primary_key_auto_increment)) { $this->primary_key_auto_increment = count($this->primary_key) == 1; } //---------------- // Prepare columns //---------------- $this->reserved_col_names = $this->getReservedColNames(); foreach ($this->cols as $k => &$c) { $c = $this->initColumn($k, $c); } }
/** * Class constructor, initializes basic properties * * @param jqGridLoader $loader */ public function __construct(jqGridLoader $loader) { //------------------ // Globals //------------------ $this->grid_id = get_class($this); $this->Loader = $loader; $this->input = $this->getInput(); $this->DB = $loader->loadDB(); //---------------- // Init //---------------- $this->beforeInit(); $this->init(); $this->afterInit(); //---------------- // Prepare columns //---------------- $this->reserved_col_names = $this->getReservedColNames(); foreach ($this->cols as $k => &$c) { $c = $this->initColumn($k, $c); } //---------------- // Primary key //---------------- if ($this->primary_key) { $this->primary_key = (array) $this->primary_key; } else { foreach ($this->cols as $k => $v) { if ($v['db'] === false) { continue; } $this->primary_key = array($k); break; } } if (is_null($this->primary_key_auto_increment)) { $this->primary_key_auto_increment = count($this->primary_key) == 1; } }
public function __construct(jqGridLoader $loader) { $this->DB = $loader->loadDB(); }