You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.6 KiB
PHP
68 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: eater
|
|
* Date: 4/2/16
|
|
* Time: 9:27 PM
|
|
*/
|
|
|
|
namespace Eater\Glim\Handler;
|
|
|
|
|
|
use Eater\Glim\Model\Server;
|
|
use Eater\Glim\Model\ServerQuery;
|
|
use Eater\Glim\Service\TwigVars;
|
|
|
|
class Panel extends Session
|
|
{
|
|
protected $shouldHaveUser = true;
|
|
|
|
public function beforeHandle()
|
|
{
|
|
$return = parent::beforeHandle();
|
|
|
|
if ($return !== null) {
|
|
return $return;
|
|
}
|
|
|
|
/** @var TwigVars $twigVar */
|
|
$twigVar = $this->get('twig-vars');
|
|
|
|
$twigVar->def(
|
|
'menu',
|
|
[
|
|
[
|
|
'name' => 'Certificates',
|
|
'path' => '/panel/certificates'
|
|
],
|
|
[
|
|
'name' => 'Servers',
|
|
'path' => '/panel/servers'
|
|
],
|
|
[
|
|
'name' => 'Invites',
|
|
'path' => '/panel/invites'
|
|
],
|
|
[
|
|
'name' => 'Config builder',
|
|
'path' => '/panel/config-builder'
|
|
],
|
|
[
|
|
'name' => 'Profile > ' . $this->getUser()->getUsername(),
|
|
'path' => '/panel/profile'
|
|
],
|
|
[
|
|
'name' => 'Logout',
|
|
'path' => '/logout'
|
|
]
|
|
]
|
|
);
|
|
|
|
$twigVar->def('currentpath', $this->getRequest()->getUri()->getPath());
|
|
}
|
|
|
|
public function handle()
|
|
{
|
|
return $this->redirect('/panel/certificates');
|
|
}
|
|
} |