harmonize My class
This commit is contained in:
parent
22f9028b71
commit
4994f376ca
1 changed files with 15 additions and 17 deletions
32
src/My.php
32
src/My.php
|
@ -17,24 +17,18 @@ namespace Dotclear\Plugin\dcLog;
|
||||||
use dcCore;
|
use dcCore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module definition shortcut.
|
* This module definition.
|
||||||
*/
|
*/
|
||||||
class My
|
class My
|
||||||
{
|
{
|
||||||
/**
|
/** @var string Admin list ID */
|
||||||
* @var string PHP min version
|
public const BACKEND_LIST_ID = 'dcloglist';
|
||||||
*/
|
|
||||||
|
/** @var string This module required php version */
|
||||||
public const PHP_MIN = '8.1';
|
public const PHP_MIN = '8.1';
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string Admin list ID
|
|
||||||
*/
|
|
||||||
public const BACKEND_LIST_ID = 'dcloglist';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module id.
|
* This module id.
|
||||||
*
|
|
||||||
* @return string The module id
|
|
||||||
*/
|
*/
|
||||||
public static function id(): string
|
public static function id(): string
|
||||||
{
|
{
|
||||||
|
@ -43,20 +37,24 @@ class My
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module name.
|
* This module name.
|
||||||
*
|
|
||||||
* @return string The module translated name
|
|
||||||
*/
|
*/
|
||||||
public static function name(): string
|
public static function name(): string
|
||||||
{
|
{
|
||||||
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
|
$name = dcCore::app()->plugins->moduleInfo(self::id(), 'name');
|
||||||
|
|
||||||
return __(is_string($name) ? $name : 'Undefined');
|
return __(is_string($name) ? $name : self::id());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check php version.
|
* This module path.
|
||||||
*
|
*/
|
||||||
* @return bool True on supported PHP version
|
public static function path(): string
|
||||||
|
{
|
||||||
|
return dirname(__DIR__);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check this module PHP version compliant.
|
||||||
*/
|
*/
|
||||||
public static function phpCompliant(): bool
|
public static function phpCompliant(): bool
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue