%PDF- %PDF-
| Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/cospend/lib/Dashboard/ |
| Current File : /www/varak.net/nextcloud.varak.net/apps_old/apps/cospend/lib/Dashboard/CospendWidget.php |
<?php
/**
* @copyright Copyright (c) 2020 Julien Veyssier <julien-nc@posteo.net>
*
* @author Julien Veyssier <julien-nc@posteo.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Cospend\Dashboard;
use OCA\Cospend\AppInfo\Application;
use OCP\Dashboard\IWidget;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Util;
class CospendWidget implements IWidget {
public function __construct(
private IL10N $l10n,
private IURLGenerator $url
) {
}
/**
* @inheritDoc
*/
public function getId(): string {
return 'cospend_activity';
}
/**
* @inheritDoc
*/
public function getTitle(): string {
return $this->l10n->t('Cospend activity');
}
/**
* @inheritDoc
*/
public function getOrder(): int {
return 10;
}
/**
* @inheritDoc
*/
public function getIconClass(): string {
return 'icon-cospend';
}
/**
* @inheritDoc
*/
public function getUrl(): ?string {
return $this->url->linkToRoute('cospend.page.index', []);
}
/**
* @inheritDoc
*/
public function load(): void {
Util::addScript(Application::APP_ID, Application::APP_ID . '-dashboard');
Util::addStyle(Application::APP_ID, 'dashboard');
}
}