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
|
|
|
|
{
|
|
|
|
public function __construct(\Slim\Container $container)
|
|
|
|
{
|
|
|
|
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
|
|
|
|
|
|
|
public function Overview(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
|
|
|
{
|
|
|
|
return $this->AppContainer->view->render($response, 'calendar', [
|
2019-03-04 17:44:48 +01:00
|
|
|
'fullcalendarEventSources' => $this->CalendarService->GetEvents()
|
2018-11-18 15:39:43 +01:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|