Front-End Upgrade: New UI Based on Admin LTE.

Closes #673
This commit is contained in:
Dan Cryer 2014-12-02 16:26:55 +00:00
commit 9eeaabc6fe
364 changed files with 51722 additions and 987 deletions

View file

@ -10,6 +10,7 @@
namespace PHPCI\Store;
use b8\Database;
use PHPCI\Model\Project;
use PHPCI\Store\Base\ProjectStoreBase;
/**
@ -39,4 +40,26 @@ class ProjectStore extends ProjectStoreBase
return array();
}
}
public function getAll()
{
$query = 'SELECT * FROM `project` ORDER BY `title` ASC';
$stmt = Database::getConnection('read')->prepare($query);
if ($stmt->execute()) {
$res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$map = function ($item) {
return new Project($item);
};
$rtn = array_map($map, $res);
$count = count($rtn);
return array('items' => $rtn, 'count' => $count);
} else {
return array('items' => array(), 'count' => 0);
}
}
}