2018-11-18 15:39:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Grocy\Controllers;
|
|
|
|
|
2019-03-04 17:44:48 +01:00
|
|
|
use \Grocy\Services\CalendarService;
|
2018-11-18 15:39:43 +01:00
|
|
|
|
|
|
|
class CalendarController extends BaseController
|
|
|
|
{
|
2020-02-11 17:42:03 +01:00
|
|
|
public function __construct(\DI\Container $container)
|
2018-11-18 15:39:43 +01:00
|
|
|
{
|
|
|
|
parent::__construct($container);
|
2019-03-04 17:44:48 +01:00
|
|
|
$this->CalendarService = new CalendarService();
|
2018-11-18 15:39:43 +01:00
|
|
|
}
|
|
|
|
|
2019-03-04 17:44:48 +01:00
|
|
|
protected $CalendarService;
|
2018-11-18 15:39:43 +01:00
|
|
|
|
2020-02-11 17:42:03 +01:00
|
|
|
public function Overview(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
2018-11-18 15:39:43 +01:00
|
|
|
{
|
2020-02-11 17:42:03 +01:00
|
|
|
return $this->View->render($response, 'calendar', [
|
2019-03-04 17:44:48 +01:00
|
|
|
'fullcalendarEventSources' => $this->CalendarService->GetEvents()
|
2018-11-18 15:39:43 +01:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|