method browse documentation in bbn\Appui\Note

function(array $cfg, bool $with_content = false) { if (isset($cfg['limit']) && ($user = bbn\User::getInstance())) { /** @var bbn\Db $db */ $db = &$this->db; $cf = &$this->class_cfg; $opt = Option::getInstance(); $cfo = $opt->getClassCfg(); $grid_cfg = [ 'table' => $cf['table'], 'fields' => [ $db->cfn($this->fields['id'], $cf['table']), $db->cfn($this->fields['id_parent'], $cf['table']), $db->cfn($this->fields['id_alias'], $cf['table']), $db->cfn($this->fields['id_type'], $cf['table']), $db->cfn($this->fields['id_option'], $cf['table']), $db->cfn($this->fields['mime'], $cf['table']), $db->cfn($this->fields['lang'], $cf['table']), $db->cfn($this->fields['private'], $cf['table']), $db->cfn($this->fields['locked'], $cf['table']), $db->cfn($this->fields['pinned'], $cf['table']), $db->cfn($this->fields['creator'], $cf['table']), $db->cfn($this->fields['active'], $cf['table']), $db->cfn($cf['arch']['versions']['version'], $cf['tables']['versions']), $db->cfn($cf['arch']['versions']['title'], $cf['tables']['versions']), $db->cfn($cf['arch']['versions']['excerpt'], $cf['tables']['versions']), $db->cfn($cf['arch']['versions']['id_user'], $cf['tables']['versions']), 'creation' => 'first_version.' . $cf['arch']['versions']['creation'], 'last_edit' => $db->cfn($cf['arch']['versions']['creation'], $cf['tables']['versions']), 'option_name' => $db->cfn($cfo['arch']['options']['text'], $cfo['table']) ], 'join' => [[ 'table' => $cf['tables']['versions'], 'on' => [ 'logic' => 'AND', 'conditions' => [[ 'field' => $db->cfn($cf['arch']['versions']['id_note'], $cf['tables']['versions']), 'operator' => '=', 'exp' => $db->cfn($this->fields['id'], $cf['table']) ], [ 'field' => $db->cfn($cf['arch']['versions']['latest'], $cf['tables']['versions']), 'operator' => '=', 'value' => 1 ]], ], ], [ 'table' => $cf['tables']['versions'], 'alias' => 'first_version', 'on' => [ 'logic' => 'AND', 'conditions' => [[ 'field' => 'first_version.' . $cf['arch']['versions']['id_note'], 'operator' => '=', 'exp' => $db->cfn($cf['arch']['notes']['id'], $cf['table']), ], [ 'field' => 'first_version.' . $cf['arch']['versions']['version'], 'operator' => '=', 'value' => 1, ]], ], ], [ 'table' => $cfo['tables']['options'], 'type' => 'left', 'on' => [ 'logic' => 'AND', 'conditions' => [[ 'field' => $db->cfn($cf['arch']['notes']['id_option'], $cf['table']), 'operator' => '=', 'exp' => $db->cfn($cfo['arch']['options']['id'], $cfo['tables']['options'], true), ]], ], ]], 'filters' => [[ 'field' => $db->cfn($cf['arch']['notes']['active'], $cf['table']), 'operator' => '=', 'value' => 1, ], [ 'field' => $db->cfn($cf['arch']['notes']['private'], $cf['table']), 'operator' => '=', 'value' => 0, ]], 'group_by' => $db->cfn($cf['arch']['notes']['id'], $cf['table']) ]; if (!empty($cfg['fields'])) { $grid_cfg['fields'] = bbn\X::mergeArrays($grid_cfg['fields'], $cfg['fields']); unset($cfg['fields']); } if (!empty($cfg['join'])) { $grid_cfg['join'] = bbn\X::mergeArrays($grid_cfg['join'], $cfg['join']); unset($cfg['join']); } if ($with_content) { $grid_cfg['fields']['content'] = 'last_version.'.$cf['arch']['versions']['content']; } $grid = new Grid($this->db, $cfg, $grid_cfg); return $grid->getDatatable(); } }

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.