Merging latest master

This commit is contained in:
Dan Cryer 2014-12-08 14:18:57 +00:00
commit 28d09275fd
83 changed files with 1283 additions and 69 deletions

View file

@ -34,7 +34,10 @@ class BuildController extends \PHPCI\Controller
* @var \PHPCI\Service\BuildService
*/
protected $buildService;
/**
* Initialise the controller, set up stores and services.
*/
public function init()
{
$this->buildStore = b8\Store\Factory::getStore('Build');
@ -78,6 +81,10 @@ class BuildController extends \PHPCI\Controller
$this->layout->nav = $nav;
}
/**
* Returns an array of the JS plugins to include.
* @return array
*/
protected function getUiPlugins()
{
$rtn = array();
@ -183,6 +190,9 @@ class BuildController extends \PHPCI\Controller
return $log;
}
/**
* Allows the UI to poll for the latest running and pending builds.
*/
public function latest()
{
$rtn = array(
@ -195,6 +205,11 @@ class BuildController extends \PHPCI\Controller
}
}
/**
* Formats a list of builds into rows suitable for the dropdowns in the PHPCI header bar.
* @param $builds
* @return array
*/
protected function formatBuilds($builds)
{
Project::$sleepable = array('id', 'title', 'reference', 'type');