In replacement of the removed Groupware settings section in https://github.com/nextcloud/server/pull/34626 Signed-off-by: Thomas Citharel <tcit@tcit.fr>tags/v26.0.0beta1
@@ -38,6 +38,7 @@ | |||
<personal>OCA\Settings\Settings\Personal\Security\TwoFactor</personal> | |||
<personal>OCA\Settings\Settings\Personal\Security\WebAuthn</personal> | |||
<personal-section>OCA\Settings\Sections\Personal\Availability</personal-section> | |||
<personal-section>OCA\Settings\Sections\Personal\Calendar</personal-section> | |||
<personal-section>OCA\Settings\Sections\Personal\PersonalInfo</personal-section> | |||
<personal-section>OCA\Settings\Sections\Personal\Security</personal-section> | |||
<personal-section>OCA\Settings\Sections\Personal\SyncClients</personal-section> |
@@ -49,6 +49,7 @@ return array( | |||
'OCA\\Settings\\Sections\\Admin\\Server' => $baseDir . '/../lib/Sections/Admin/Server.php', | |||
'OCA\\Settings\\Sections\\Admin\\Sharing' => $baseDir . '/../lib/Sections/Admin/Sharing.php', | |||
'OCA\\Settings\\Sections\\Personal\\Availability' => $baseDir . '/../lib/Sections/Personal/Availability.php', | |||
'OCA\\Settings\\Sections\\Personal\\Calendar' => $baseDir . '/../lib/Sections/Personal/Calendar.php', | |||
'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => $baseDir . '/../lib/Sections/Personal/PersonalInfo.php', | |||
'OCA\\Settings\\Sections\\Personal\\Security' => $baseDir . '/../lib/Sections/Personal/Security.php', | |||
'OCA\\Settings\\Sections\\Personal\\SyncClients' => $baseDir . '/../lib/Sections/Personal/SyncClients.php', |
@@ -64,6 +64,7 @@ class ComposerStaticInitSettings | |||
'OCA\\Settings\\Sections\\Admin\\Server' => __DIR__ . '/..' . '/../lib/Sections/Admin/Server.php', | |||
'OCA\\Settings\\Sections\\Admin\\Sharing' => __DIR__ . '/..' . '/../lib/Sections/Admin/Sharing.php', | |||
'OCA\\Settings\\Sections\\Personal\\Availability' => __DIR__ . '/..' . '/../lib/Sections/Personal/Availability.php', | |||
'OCA\\Settings\\Sections\\Personal\\Calendar' => __DIR__ . '/..' . '/../lib/Sections/Personal/Calendar.php', | |||
'OCA\\Settings\\Sections\\Personal\\PersonalInfo' => __DIR__ . '/..' . '/../lib/Sections/Personal/PersonalInfo.php', | |||
'OCA\\Settings\\Sections\\Personal\\Security' => __DIR__ . '/..' . '/../lib/Sections/Personal/Security.php', | |||
'OCA\\Settings\\Sections\\Personal\\SyncClients' => __DIR__ . '/..' . '/../lib/Sections/Personal/SyncClients.php', |
@@ -0,0 +1,55 @@ | |||
<?php | |||
declare(strict_types=1); | |||
/** | |||
* @author Christoph Wurst <christoph@winzerhof-wurst.at> | |||
* | |||
* | |||
* This code is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU Affero General Public License, version 3, | |||
* as published by the Free Software Foundation. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU Affero General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU Affero General Public License, version 3, | |||
* along with this program. If not, see <http://www.gnu.org/licenses/> | |||
* | |||
*/ | |||
namespace OCA\Settings\Sections\Personal; | |||
use OCP\IL10N; | |||
use OCP\IURLGenerator; | |||
use OCP\Settings\IIconSection; | |||
class Calendar implements IIconSection { | |||
private IL10N $l; | |||
private IURLGenerator $urlGenerator; | |||
public function __construct(IL10N $l, IURLGenerator $urlGenerator) { | |||
$this->l = $l; | |||
$this->urlGenerator = $urlGenerator; | |||
} | |||
public function getIcon(): string { | |||
return $this->urlGenerator->imagePath('core', 'caldav/time.svg'); | |||
} | |||
public function getID(): string { | |||
return 'calendar'; | |||
} | |||
public function getName(): string { | |||
return $this->l->t('Calendar'); | |||
} | |||
public function getPriority(): int { | |||
return 50; | |||
} | |||
} |