mail_calendar_sync/lib/Settings/PersonalSection.php
2026-02-09 23:02:34 -05:00

39 lines
777 B
PHP

<?php
declare(strict_types=1);
namespace OCA\MailCalendarSync\Settings;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
class PersonalSection implements IIconSection {
public function __construct(
private IL10N $l,
private IURLGenerator $urlGenerator,
) {
}
public function getID(): string {
return 'mail_calendar_sync';
}
public function getName(): string {
return $this->l->t('Mail Calendar Sync');
}
public function getPriority(): int {
return 80;
}
public function getIcon(): string {
try {
return $this->urlGenerator->imagePath('core', 'places/calendar.svg');
} catch (\RuntimeException $e) {
return '';
}
}
}