method getList documentation in bbn\Appui\Observer
function(string $id_user = NULL)
{
$field = $id_user ? 'o.id_user' : 'public';
$now = date('Y-m-d H:i:s');
return $this->db->rselectAll([
'tables' => ['o' => 'bbn_observers'],
'fields' => [
'o.id', 'o.id_alias',
'request' => 'IFNULL(ro.request, o.request)',
'params' => 'IFNULL(ro.params, o.params)',
'frequency' => 'IFNULL(ro.frequency, o.frequency)',
'result' => 'IFNULL(ro.result, o.result)',
'next' => 'IFNULL(ro.next, o.next)'
],
'join' => [
[
'table' => 'bbn_observers',
'type' => 'left',
'alias' => 'ro',
'on' => [
[
'field' => 'o.id_alias',
'exp' => 'ro.id'
]
]
]
],
'where' => [
[
'field' => $id_user ? 'o.id_user' : 'o.public',
'operator' => '=',
'value' => $id_user ?: 1
], [
'logic' => 'OR',
'conditions' => [
[
'logic' => 'AND',
'conditions' => [
[
'field' => 'o.next',
'operator' => '<',
'value' => $now
], [
'field' => 'o.next',
'operator' => 'isnotnull'
]
]
], [
'logic' => 'AND',
'conditions' => [
[
'field' => 'ro.next',
'operator' => '<',
'value' => $now
], [
'field' => 'ro.next',
'operator' => 'isnotnull'
]
]
]
]
]
]
]);
}
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