method infoRoles documentation in bbn\Appui\Task
function($id)
{
if ($roles = self::getAppuiOptions('roles')) {
$userCfg = bbn\User::getInstance()->getClassCfg();
$optCfg = bbn\Appui\Option::getInstance()->getClassCfg();
$all = $this->db->rselectAll([
'table' => 'bbn_tasks_roles',
'fields' => [],
'join' => [[
'table' => $optCfg['table'],
'on' => [
'conditions' => [[
'field' => $this->db->cfn($optCfg['arch']['options']['id'], $optCfg['table']),
'exp' => 'bbn_tasks_roles.role'
]]
]
], [
'table' => $userCfg['table'],
'on' => [
'conditions' => [[
'field' => $this->db->cfn($userCfg['arch']['users']['id'], $userCfg['table']),
'exp' => 'bbn_tasks_roles.id_user'
], [
'field' => $this->db->cfn($userCfg['arch']['users']['active'], $userCfg['table']),
'value' => 1
]]
]
]],
'where' => ['id_task' => $id],
'order' => [$this->db->cfn($userCfg['arch']['users']['username'], $userCfg['table']) => 'asc']
]);
foreach ( $all as $a ){
$code = X::getField($roles, ['id' => $a['role']], 'code');
if (!isset($r[$code])) {
$r[$code] = [];
}
$r[$code][] = $a['id_user'];;
}
}
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