static function getTeamFor($projects_id)
{
global $DB;
$team = array();
$query = "SELECT `glpi_projectteams`.*\n FROM `glpi_projectteams`\n WHERE `projects_id` = '{$projects_id}'";
foreach ($DB->request($query) as $data) {
if (!isset($team[$data['itemtype']])) {
$team[$data['itemtype']] = array();
}
$team[$data['itemtype']][] = $data;
}
// Define empty types
foreach (static::$available_types as $type) {
if (!isset($team[$type])) {
$team[$type] = array();
}
}
return $team;
}