summaryrefslogtreecommitdiffstats
path: root/lib/private/Settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-10-28 22:51:49 +0100
committerMorris Jobke <hey@morrisjobke.de>2020-10-28 23:05:00 +0100
commitb8ed99723822d23c9a3a0b413eb237c93fc60c99 (patch)
treea3e2136a5faa0ac5bca63d3d2f6936272edbd0db /lib/private/Settings
parentef382f541c42f719b8dd30a4e0e248ef1bc39c84 (diff)
downloadnextcloud-server-b8ed99723822d23c9a3a0b413eb237c93fc60c99.tar.gz
nextcloud-server-b8ed99723822d23c9a3a0b413eb237c93fc60c99.zip
Remove ISection in favor of IIconSection
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Settings')
-rw-r--r--lib/private/Settings/Manager.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php
index 65193e2cac8..37a87a40725 100644
--- a/lib/private/Settings/Manager.php
+++ b/lib/private/Settings/Manager.php
@@ -38,8 +38,8 @@ use OCP\ILogger;
use OCP\IServerContainer;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
+use OCP\Settings\IIconSection;
use OCP\Settings\IManager;
-use OCP\Settings\ISection;
use OCP\Settings\ISettings;
use OCP\Settings\ISubAdminSettings;
@@ -80,7 +80,7 @@ class Manager implements IManager {
/**
* @param string $type 'admin' or 'personal'
- * @param string $section Class must implement OCP\Settings\ISection
+ * @param string $section Class must implement OCP\Settings\IIconSection
*
* @return void
*/
@@ -95,7 +95,7 @@ class Manager implements IManager {
/**
* @param string $type 'admin' or 'personal'
*
- * @return ISection[]
+ * @return IIconSection[]
*/
protected function getSections(string $type): array {
if (!isset($this->sections[$type])) {
@@ -108,18 +108,13 @@ class Manager implements IManager {
foreach (array_unique($this->sectionClasses[$type]) as $index => $class) {
try {
- /** @var ISection $section */
+ /** @var IIconSection $section */
$section = \OC::$server->query($class);
} catch (QueryException $e) {
$this->log->logException($e, ['level' => ILogger::INFO]);
continue;
}
- if (!$section instanceof ISection) {
- $this->log->logException(new \InvalidArgumentException('Invalid settings section registered'), ['level' => ILogger::INFO]);
- continue;
- }
-
$sectionID = $section->getID();
if ($sectionID !== 'connected-accounts' && isset($this->sections[$type][$sectionID])) {
@@ -212,7 +207,7 @@ class Manager implements IManager {
$appSections = $this->getSections('admin');
foreach ($appSections as $section) {
- /** @var ISection $section */
+ /** @var IIconSection $section */
if (!isset($sections[$section->getPriority()])) {
$sections[$section->getPriority()] = [];
}
@@ -269,7 +264,7 @@ class Manager implements IManager {
$appSections = $this->getSections('personal');
foreach ($appSections as $section) {
- /** @var ISection $section */
+ /** @var IIconSection $section */
if (!isset($sections[$section->getPriority()])) {
$sections[$section->getPriority()] = [];
}