method info documentation in bbn\Appui\Task
function($id, $with_comments = false)
{
$info['first'] = $this->db->selectOne('bbn_tasks_logs', 'chrono', [
'id_task' => $id,
'action' => $this->idAction('insert')
], ['chrono' => 'ASC']);
$info['last'] = $this->db->selectOne('bbn_tasks_logs', 'chrono', [
'id_task' => $id,
], ['chrono' => 'DESC']);
$info['roles'] = $this->infoRoles($id);
$info['notes'] = $with_comments ? $this->getComments($id) : $this->getCommentsIds($id);
$info['children'] = $this->getChildren($id);
$info['aliases'] = $this->db->rselectAll('bbn_tasks', ['id', 'title'], ['id_alias' => $id, 'active' => 1]);
$info['num_children'] = \count($info['children']);
$info['has_children'] = !empty($info['num_children']);
$info['reference'] = false;
if ( $this->references ){
foreach ( $this->references as $table => $ref ){
foreach ( $ref['refs'] as $j => $r ){
if ( $id_ref = $this->db->selectOne($table, $j, [$ref['column'] => $id]) ){
$info['reference'] = $this->template === false ? $id_ref : \call_user_func($this->template, $this->db, $id_ref, $table);
break;
}
}
if ( $info['reference'] ){
break;
}
}
}
if (!empty($info['id_parent'])) {
$info['parent'] = $this->info($info['id_parent'], $with_comments);
}
return $info;
}
}
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-2022
BBN Solutions