-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b584f8
commit 21f5cf7
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
namespace OCA\OpenConnector\Settings; | ||
|
||
use OCP\AppFramework\Http\TemplateResponse; | ||
use OCP\IConfig; | ||
use OCP\IL10N; | ||
use OCP\Settings\ISettings; | ||
|
||
class OpenConnectorAdmin implements ISettings { | ||
private IL10N $l; | ||
private IConfig $config; | ||
|
||
public function __construct(IConfig $config, IL10N $l) { | ||
$this->config = $config; | ||
$this->l = $l; | ||
} | ||
|
||
/** | ||
* @return TemplateResponse | ||
*/ | ||
public function getForm() { | ||
$parameters = [ | ||
'mySetting' => $this->config->getSystemValue('open_connector_setting', true), | ||
]; | ||
|
||
return new TemplateResponse('openconnector', 'settings/admin', $parameters, ''); | ||
} | ||
|
||
public function getSection() { | ||
return 'openconnector'; // Name of the previously created section. | ||
} | ||
|
||
/** | ||
* @return int whether the form should be rather on the top or bottom of | ||
* the admin section. The forms are arranged in ascending order of the | ||
* priority values. It is required to return a value between 0 and 100. | ||
* | ||
* E.g.: 70 | ||
*/ | ||
public function getPriority() { | ||
return 10; | ||
} | ||
} |