cleanup global context (#1943)

This commit is contained in:
Kevin Papst
2020-09-08 20:35:14 +02:00
committed by GitHub
parent 217960de60
commit e2a742b5c1
9 changed files with 54 additions and 63 deletions

View File

@@ -13,7 +13,6 @@ use App\Calendar\Google;
use App\Calendar\Source;
use App\Configuration\CalendarConfiguration;
use App\Timesheet\TrackingModeService;
use App\Timesheet\UserDateTimeFactory;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\Routing\Annotation\Route;
@@ -28,14 +27,14 @@ class CalendarController extends AbstractController
/**
* @Route(path="/", name="calendar", methods={"GET"})
*/
public function userCalendar(CalendarConfiguration $configuration, UserDateTimeFactory $dateTime, TrackingModeService $service)
public function userCalendar(CalendarConfiguration $configuration, TrackingModeService $service)
{
$mode = $service->getActiveMode();
return $this->render('calendar/user.html.twig', [
'config' => $configuration,
'google' => $this->getGoogleSources($configuration),
'now' => $dateTime->createDateTime(),
'now' => $this->getDateTimeFactory()->createDateTime(),
'is_punch_mode' => !$mode->canEditDuration() && !$mode->canEditBegin() && !$mode->canEditEnd()
]);
}