dcLog/src/My.php

53 lines
942 B
PHP
Raw Normal View History

2023-03-11 14:53:06 +00:00
<?php
/**
* @brief dcLog, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Tomtom and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\dcLog;
use dcCore;
2023-04-23 08:59:23 +00:00
/**
2023-05-08 08:29:26 +00:00
* This module definition.
2023-04-23 08:59:23 +00:00
*/
2023-03-11 14:53:06 +00:00
class My
{
2023-05-08 08:29:26 +00:00
/** @var string Admin list ID */
2023-03-11 14:53:06 +00:00
public const BACKEND_LIST_ID = 'dcloglist';
/**
2023-04-23 08:59:23 +00:00
* This module id.
2023-03-11 14:53:06 +00:00
*/
public static function id(): string
{
return basename(dirname(__DIR__));
}
/**
2023-04-23 08:59:23 +00:00
* This module name.
2023-03-11 14:53:06 +00:00
*/
public static function name(): string
{
2023-04-29 19:51:41 +00:00
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
2023-05-08 08:29:26 +00:00
return __(is_string($name) ? $name : self::id());
}
/**
* This module path.
*/
public static function path(): string
{
return dirname(__DIR__);
2023-03-11 14:53:06 +00:00
}
}