Files
kimai/src/Controller/SidebarController.php
Kevin Papst bfa32a90db Update to Symfony 4.1 #149 (#160)
* updated to Symfony 4.1 #149
* updated to phpunit 7 #149
* downgrade ocramius/proxy-manager for PHP 7.1 compatibility #149
* fixed symfony deprecations #149
* replaced AdvancedUserInterface with custom user checker
* code sniffer fixes
2018-06-18 22:26:00 +02:00

54 lines
1.2 KiB
PHP

<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Controller;
use App\Form\UserPreferencesForm;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
/**
* Sidebar controller
*
* @Security("has_role('ROLE_USER')")
*/
class SidebarController extends AbstractController
{
/**
* @return \Symfony\Component\HttpFoundation\Response
*/
public function homeAction()
{
return $this->render('sidebar/home.html.twig', []);
}
/**
* @return \Symfony\Component\HttpFoundation\Response
*/
public function settingsAction()
{
$user = $this->getUser();
return $this->render('sidebar/settings.html.twig', [
'user' => $user,
]);
/*
$form = $this->createForm(UserPreferencesForm::class, $user, [
'action' => $this->generateUrl('user_profile_preferences', ['username' => $user->getUsername()]),
'method' => 'POST',
]);
return $this->render('sidebar/settings.html.twig', [
'form' => $form->createView(),
]);
*/
}
}