method getDatatable documentation in bbn\Appui\Grid
function($force = false)
{
$r = [
'data' => [],
'total' => 0,
'success' => true,
'error' => false,
'time' => []
];
if ( $this->check() ){
if ($total = $this->getTotal($force)) {
if ( $this->cfg['start'] ){
$r['start'] = $this->cfg['start'];
}
if ( $this->cfg['limit'] ){
$r['limit'] = $this->cfg['limit'];
}
if ( $this->observer ){
$r['observer'] = $this->getObserver();
}
$r['total'] = $total;
$r['data'] = $this->getData();
$r['time'] = [
'query' => $this->query_time,
'count' => $this->count_time
];
}
//unset($this->count_cfg['where']['conditions'][0]['time']);
//$this->count_cfg['where']['conditions'][0]['value'] = hex2bin($this->count_cfg['where']['conditions'][0]['value']);
//die(X::dump($this->db->selectOne($this->count_cfg), $this->db->last(), $this->count_cfg, $this->num, $this->db->last_params));
if (!defined('BBN_IS_PROD') || (($usr = bbn\User::getInstance()) && $usr->isAdmin())) {
$r['query'] = $this->db->last();
$r['queryValues'] = array_map(function($a){
if (Str::isBuid($a)) {
return bin2hex($a);
}
return $a;
}, $this->db->getLastValues());
}
//die(var_dump($r['query']));
}
if ( !$this->db->check() ){
$r['success'] = false;
$r['error'] = $this->db->last_error;
}
return $r;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions