OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
35
app/Domain/Calendar/Controllers/ShowAllGCals.php
Normal file
35
app/Domain/Calendar/Controllers/ShowAllGCals.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Calendar\Controllers;
|
||||
|
||||
use Leantime\Core\Auth\Permissions\RequiresPermission;
|
||||
use Leantime\Core\Controller\Controller;
|
||||
use Leantime\Domain\Calendar\Permissions\CalendarPermissions;
|
||||
use Leantime\Domain\Calendar\Services\Calendar as CalendarService;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ShowAllGCals extends Controller
|
||||
{
|
||||
private CalendarService $calendarService;
|
||||
|
||||
/**
|
||||
* Initializes dependencies.
|
||||
*/
|
||||
public function init(CalendarService $calendarService): void
|
||||
{
|
||||
$this->calendarService = $calendarService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays all external calendars.
|
||||
*
|
||||
* @param array $params Request parameters
|
||||
*/
|
||||
#[RequiresPermission(CalendarPermissions::VIEW)]
|
||||
public function get(array $params): Response
|
||||
{
|
||||
$this->tpl->assign('allCalendars', $this->calendarService->getMyExternalCalendars(session('userdata.id')));
|
||||
|
||||
return $this->tpl->display('calendar.showAllGCals');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user