method getAll documentation in bbn\Appui\Planning

Gets all events of a period.

function(string $start, string $end, string $id_staff = NULL) { $et = $this->ecfg['table']; $ef = $this->ecfg['arch']['events']; $rt = $this->ecfg['tables']['recurring']; $rf = $this->ecfg['arch']['recurring']; $where = [ 'logic' => 'OR', 'conditions' => [[ 'conditions' => [[ 'field' => $this->db->colFullName($ef['start'], $et), 'operator' => '<=', 'value' => $end ], [ 'logic' => 'OR', 'conditions' => [[ 'field' => $this->db->colFullName($ef['end'], $et), 'operator' => '>=', 'value' => $start ], [ 'field' => $this->db->colFullName($ef['end'], $et), 'operator' => 'isnull' ]] ]] ], [ 'conditions' => [[ 'field' => $this->db->colFullName($ef['start'], $et), 'operator' => '<=', 'value' => $start ], [ 'field' => $this->db->colFullName($ef['recurring'], $et), 'value' => 1 ]] ]] ]; if ( \bbn\Str::isUid($id_staff) ){ $where = [ 'conditions' => [[ 'field' => $this->db->colFullName($this->fields['id_staff'], $this->class_table), 'value' => $id_staff ], $where] ]; } if ( $events = $this->db->rselectAll([ 'table' => $this->class_table, 'fields' => [ $this->db->colFullName($this->fields['id'], $this->class_table), $this->db->colFullName($this->fields['id_staff'], $this->class_table), $this->db->colFullName($this->fields['id_event'], $this->class_table), $this->db->colFullName($this->fields['id_alias'], $this->class_table), $this->db->colFullName($this->fields['alias'], $this->class_table), $this->db->colFullName($ef['id_parent'], $et), $ef['id_type'], $ef['start'], $ef['end'], $ef['name'], $ef['recurring'], $ef['cfg'], $rf['type'], $rf['interval'], $rf['occurrences'], $rf['until'], $rf['wd'], $rf['mw'], $rf['md'], $rf['ym'] ], 'join' => [[ 'table' => $et, 'on' => [ 'conditions' => [[ 'field' => $this->db->colFullName($ef['id'], $et), 'exp' => $this->db->colFullName($this->fields['id_event'], $this->class_table) ]] ] ], [ 'table' => $rt, 'type' => 'left', 'on' => [ 'conditions' => [[ 'field' => $this->db->colFullName($ef['id'], $et), 'exp' => $this->db->colFullName($rf['id_event'], $rt), ]] ] ], [ 'table' => $this->ocfg['table'], 'on' => [ 'conditions' => [[ 'field' => $this->db->colFullName($ef['id_type'], $et), 'exp' => $this->db->colFullName($this->ocfg['arch']['options']['id'], $this->ocfg['table']), ]] ] ]], 'where' => $where ]) ){ return $this->analyze($start, $end, $events); } return []; }

Gets all events of a period. 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.