19 declare(strict_types=1);
    30     public static function getList(
string $a_str): string
    34         $ilDB = $DIC->database();
    35         $ilDB->setLimit(20, 0);
    36         $query = 
"SELECT o1.title role,o2.title container FROM object_data o1 " .
    37             "JOIN rbac_fa fa ON o1.obj_id = rol_id " .
    40             "JOIN object_reference obr ON ref_id = fa.parent AND obr.deleted IS NULL " .
    41             "JOIN object_data o2 ON obr.obj_id = o2.obj_id " .
    42             "INNER JOIN tree t ON t.child = obr.ref_id AND t.tree = 1 " .
    43             "WHERE o1.type = 'role' " .
    45             "AND (" . 
$ilDB->like(
'o1.title', 
'text', 
'%' . $a_str . 
'%') . 
"OR " .
    46                 $ilDB->like(
'o2.title', 
'text', 
'%' . $a_str . 
'%') . 
" )" .
    47             "AND fa.parent != 8 " .
    48             "ORDER BY role,container";
    55             $result[$counter]->value = $row->role;
    56             $result[$counter]->label = $row->role . 
" (" . $row->container . 
")";
    61             return self::getListByObject($a_str);
    64         return json_encode($result, JSON_THROW_ON_ERROR);
    74         $rbacreview = $DIC->rbac()->review();
    75         $ilDB = $DIC->database();
    79         if (strpos($a_str, 
'@') !== 0) {
    80             return json_encode($result, JSON_THROW_ON_ERROR);
    83         $a_str = substr($a_str, 1);
    85         $ilDB->setLimit(100, 0);
    86         $query = 
"SELECT ref_id, title FROM object_data ode " .
    87             "JOIN object_reference ore ON ode.obj_id = ore.obj_id " .
    88             "WHERE " . 
$ilDB->like(
'title', 
'text', $a_str . 
'%') . 
' ' .
    93             foreach ($rbacreview->getRolesOfRoleFolder($row->ref_id, 
false) as $rol_id) {
    97                 $result[$counter]->value = $role;
    98                 $result[$counter]->label = $role . 
" (" . $row->title . 
")";
   102         return json_encode($result, JSON_THROW_ON_ERROR);
 
static getList(string $a_str)
Get completion list. 
 
static getListByObject(string $a_str)
Get list of roles assigned to an object. 
 
static _lookupTitle(int $obj_id)
 
Auto completion class for user lists.