CockpitCMS-Drone/Controller/Admin.php
Sebastian Frank a3cce2df73 init
2019-03-05 15:28:29 +01:00

32 lines
571 B
PHP

<?php
namespace Drone\Controller;
use Cockpit\AuthController;
/**
* Admin controller class.
*/
class Admin extends AuthController
{
/**
* Default index controller.
*/
public function index()
{
if (!$this->app->module('cockpit')->hasaccess('drone', 'manage.view')) {
return false;
}
$data = $this->app->module('drone')->fetchDeploys();
return $this->render('drone:views/deploys/index.php', [
'deploys' => $data['deploys'] ?? [],
'building' => $data['building'] ?? FALSE,
'build' => $data['build']
]);
}
}