aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Dashboard
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-08-04 15:20:05 +0200
committerJulius Härtl <jus@bitgrid.net>2020-08-05 17:03:38 +0200
commit018be662f4df89345b528382ab300269d4a88048 (patch)
tree474a64e9a86f1070f7aeacf947334a1922655d58 /lib/public/Dashboard
parent6accf4d857b4233cff698e602041a5126a57e940 (diff)
downloadnextcloud-server-018be662f4df89345b528382ab300269d4a88048.tar.gz
nextcloud-server-018be662f4df89345b528382ab300269d4a88048.zip
Refactor API to match the widget wording
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public/Dashboard')
-rw-r--r--lib/public/Dashboard/IManager.php8
-rw-r--r--lib/public/Dashboard/IWidget.php (renamed from lib/public/Dashboard/IPanel.php)14
-rw-r--r--lib/public/Dashboard/RegisterWidgetEvent.php (renamed from lib/public/Dashboard/RegisterPanelEvent.php)6
3 files changed, 14 insertions, 14 deletions
diff --git a/lib/public/Dashboard/IManager.php b/lib/public/Dashboard/IManager.php
index 985c8c7838f..81b1bb0dffe 100644
--- a/lib/public/Dashboard/IManager.php
+++ b/lib/public/Dashboard/IManager.php
@@ -35,15 +35,15 @@ namespace OCP\Dashboard;
interface IManager {
/**
- * @param string $panelClass
+ * @param string $widgetClass
* @since 20.0.0
*/
- public function lazyRegisterPanel(string $panelClass): void;
+ public function lazyRegisterWidget(string $widgetClass): void;
/**
* @since 20.0.0
*
- * @return IPanel[]
+ * @return IWidget[]
*/
- public function getPanels(): array;
+ public function getWidgets(): array;
}
diff --git a/lib/public/Dashboard/IPanel.php b/lib/public/Dashboard/IWidget.php
index 59d88f7a7e9..42e2c7df5b2 100644
--- a/lib/public/Dashboard/IPanel.php
+++ b/lib/public/Dashboard/IWidget.php
@@ -27,33 +27,33 @@ declare(strict_types=1);
namespace OCP\Dashboard;
/**
- * Interface IPanel
+ * Interface IWidget
*
* @package OCP\Dashboard
* @since 20.0.0
*/
-interface IPanel {
+interface IWidget {
/**
- * @return string Unique id that identifies the panel, e.g. the app id
+ * @return string Unique id that identifies the widget, e.g. the app id
* @since 20.0.0
*/
public function getId(): string;
/**
- * @return string User facing title of the panel
+ * @return string User facing title of the widget
* @since 20.0.0
*/
public function getTitle(): string;
/**
- * @return int Initial order for panel sorting
+ * @return int Initial order for widget sorting
* @since 20.0.0
*/
public function getOrder(): int;
/**
- * @return string css class that displays an icon next to the panel title
+ * @return string css class that displays an icon next to the widget title
* @since 20.0.0
*/
public function getIconClass(): string;
@@ -65,7 +65,7 @@ interface IPanel {
public function getUrl(): ?string;
/**
- * Execute panel bootstrap code like loading scripts and providing initial state
+ * Execute widget bootstrap code like loading scripts and providing initial state
* @since 20.0.0
*/
public function load(): void;
diff --git a/lib/public/Dashboard/RegisterPanelEvent.php b/lib/public/Dashboard/RegisterWidgetEvent.php
index 2bd157127fd..0267a9e0d36 100644
--- a/lib/public/Dashboard/RegisterPanelEvent.php
+++ b/lib/public/Dashboard/RegisterWidgetEvent.php
@@ -40,7 +40,7 @@ use OCP\EventDispatcher\Event;
* @since 20.0.0
* @deprecated 20.0.0
*/
-class RegisterPanelEvent extends Event {
+class RegisterWidgetEvent extends Event {
private $manager;
public function __construct(IManager $manager) {
@@ -53,7 +53,7 @@ class RegisterPanelEvent extends Event {
* @param string $panelClass
* @since 20.0.0
*/
- public function registerPanel(string $panelClass) {
- $this->manager->lazyRegisterPanel($panelClass);
+ public function registerWidget(string $panelClass) {
+ $this->manager->lazyRegisterWidget($panelClass);
}
}