Split dashboard into widgets. Add build errors widget.
This commit is contained in:
parent
257aabc113
commit
11f58d7c2b
24 changed files with 793 additions and 328 deletions
|
|
@ -58,6 +58,30 @@ class ProjectStore extends Store
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single Project by Ids.
|
||||
* @param int[]
|
||||
* @return Project[]
|
||||
*/
|
||||
public function getByIds($values, $useConnection = 'read')
|
||||
{
|
||||
if (empty($values)) {
|
||||
throw new HttpException('Values passed to ' . __FUNCTION__ . ' cannot be empty.');
|
||||
}
|
||||
|
||||
$query = 'SELECT * FROM {{project}} WHERE {{id}} IN ('.implode(', ', array_map('intval', $values)).')';
|
||||
$stmt = Database::getConnection($useConnection)->prepareCommon($query);
|
||||
|
||||
$rtn = [];
|
||||
if ($stmt->execute()) {
|
||||
while ($data = $stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
$rtn[$data['id']] = new Project($data);
|
||||
}
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get multiple Project by Title.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue