OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
29
app/Domain/Widgets/Hxcontrollers/Calendar.php
Normal file
29
app/Domain/Widgets/Hxcontrollers/Calendar.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Widgets\Hxcontrollers;
|
||||
|
||||
use Leantime\Core\Controller\HtmxController;
|
||||
use Leantime\Domain\Calendar\Services\Calendar as CalendarService;
|
||||
|
||||
class Calendar extends HtmxController
|
||||
{
|
||||
protected static string $view = 'widgets::partials.calendar';
|
||||
|
||||
private CalendarService $calendarService;
|
||||
|
||||
/**
|
||||
* Initializes dependencies.
|
||||
*/
|
||||
public function init(CalendarService $calendarService): void
|
||||
{
|
||||
$this->calendarService = $calendarService;
|
||||
}
|
||||
|
||||
public function get(): void
|
||||
{
|
||||
$userId = (int) session('userdata.id');
|
||||
|
||||
$this->tpl->assign('externalCalendars', $this->calendarService->getMyExternalCalendars($userId));
|
||||
$this->tpl->assign('calendar', $this->calendarService->getCalendar($userId));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user