2022-01-21 23:53:03 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* ownCloud - Epubreader App
|
|
|
|
*
|
|
|
|
* @author Frank de Lange
|
|
|
|
* @copyright 2014,2018 Frank de Lange
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCA\Epubreader\Settings;
|
|
|
|
|
|
|
|
use OCP\IL10N;
|
|
|
|
use OCP\IURLGenerator;
|
|
|
|
use OCP\Settings\IIconSection;
|
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
class PersonalSection implements IIconSection {
|
2023-06-16 19:20:03 +00:00
|
|
|
|
|
|
|
private IURLGenerator $urlGenerator;
|
|
|
|
private IL10N $l;
|
2022-01-21 23:53:03 +00:00
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
public function __construct(IURLGenerator $urlGenerator, IL10N $l) {
|
|
|
|
$this->urlGenerator = $urlGenerator;
|
|
|
|
$this->l = $l;
|
|
|
|
}
|
2022-01-21 23:53:03 +00:00
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
/**
|
|
|
|
* returns the relative path to an 16*16 icon describing the section.
|
|
|
|
*
|
2023-06-16 19:20:03 +00:00
|
|
|
* @return string
|
2023-06-16 14:58:23 +00:00
|
|
|
*/
|
2023-06-16 19:20:03 +00:00
|
|
|
public function getIcon(): string {
|
2023-06-16 14:58:23 +00:00
|
|
|
return $this->urlGenerator->imagePath('epubreader', 'app.svg');
|
|
|
|
}
|
2022-01-21 23:53:03 +00:00
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
/**
|
|
|
|
* returns the ID of the section. It is supposed to be a lower case string,
|
|
|
|
*
|
2023-06-16 19:20:03 +00:00
|
|
|
* @return string
|
2023-06-16 14:58:23 +00:00
|
|
|
*/
|
2023-06-16 19:20:03 +00:00
|
|
|
public function getID(): string {
|
2023-06-16 14:58:23 +00:00
|
|
|
return 'epubreader';
|
|
|
|
}
|
2022-01-21 23:53:03 +00:00
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
/**
|
|
|
|
* returns the translated name as it should be displayed
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2023-06-16 19:20:03 +00:00
|
|
|
public function getName(): string {
|
2023-06-16 14:58:23 +00:00
|
|
|
return $this->l->t('EPUB/CBZ/PDF ebook reader');
|
|
|
|
}
|
2022-01-21 23:53:03 +00:00
|
|
|
|
2023-06-16 14:58:23 +00:00
|
|
|
/**
|
|
|
|
* returns priority for positioning
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
2023-06-16 19:20:03 +00:00
|
|
|
public function getPriority(): int {
|
2023-06-16 14:58:23 +00:00
|
|
|
return 20;
|
|
|
|
}
|
|
|
|
}
|