67 lines
1.3 KiB
PHP
67 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace OCA\FaceRecognition\Settings;
|
|
|
|
use OCP\IL10N;
|
|
use OCP\IURLGenerator;
|
|
use OCP\Settings\IIconSection;
|
|
|
|
class AdminSection implements IIconSection
|
|
{
|
|
/** @var IURLGenerator */
|
|
private $urlGenerator;
|
|
/** @var IL10N */
|
|
private $l;
|
|
|
|
public function __construct(IURLGenerator $urlGenerator, IL10N $l)
|
|
{
|
|
$this->urlGenerator = $urlGenerator;
|
|
$this->l = $l;
|
|
}
|
|
|
|
/**
|
|
* returns the relative path to an 16*16 icon describing the section.
|
|
*
|
|
* @returns string
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getIcon()
|
|
{
|
|
return $this->urlGenerator->imagePath('facerecognition', 'app-dark.svg');
|
|
}
|
|
|
|
/**
|
|
* returns the ID of the section. It is supposed to be a lower case string,
|
|
*
|
|
* @returns string
|
|
*
|
|
* @return string
|
|
*
|
|
* @psalm-return 'facerecognition'
|
|
*/
|
|
public function getID()
|
|
{
|
|
return 'facerecognition';
|
|
}
|
|
|
|
/**
|
|
* returns the translated name as it should be displayed
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->l->t('Face Recognition');
|
|
}
|
|
|
|
/**
|
|
* returns priority for positioning
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getPriority()
|
|
{
|
|
return 10;
|
|
}
|
|
} |