cosmetic (doc)
This commit is contained in:
parent
588fc6927e
commit
d8206c992e
2 changed files with 27 additions and 18 deletions
|
@ -26,7 +26,7 @@ use dcTemplate;
|
||||||
class FrontendTemplate
|
class FrontendTemplate
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Template condition to check if there is an expired date
|
* Template condition to check if there is an expired date.
|
||||||
*
|
*
|
||||||
* @param ArrayObject $attr Block attributes
|
* @param ArrayObject $attr Block attributes
|
||||||
* @param string $content Block content
|
* @param string $content Block content
|
||||||
|
@ -53,7 +53,7 @@ class FrontendTemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template for expired date
|
* Template for expired date.
|
||||||
*
|
*
|
||||||
* @param ArrayObject $attr Value attributes
|
* @param ArrayObject $attr Value attributes
|
||||||
*
|
*
|
||||||
|
@ -79,7 +79,7 @@ class FrontendTemplate
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Template for expired time
|
* Template for expired time.
|
||||||
*
|
*
|
||||||
* @param ArrayObject $attr Value attributes
|
* @param ArrayObject $attr Value attributes
|
||||||
*
|
*
|
||||||
|
|
17
src/My.php
17
src/My.php
|
@ -16,13 +16,18 @@ namespace Dotclear\Plugin\postExpired;
|
||||||
|
|
||||||
use dcCore;
|
use dcCore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module definiton shortcut.
|
||||||
|
*/
|
||||||
class My
|
class My
|
||||||
{
|
{
|
||||||
/** @var string This plugin meta type */
|
/** @var string This plugin meta type */
|
||||||
public const META_TYPE = 'post_expired';
|
public const META_TYPE = 'post_expired';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module id
|
* This module id.
|
||||||
|
*
|
||||||
|
* @return string The module id
|
||||||
*/
|
*/
|
||||||
public static function id(): string
|
public static function id(): string
|
||||||
{
|
{
|
||||||
|
@ -30,7 +35,9 @@ class My
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module name
|
* This module name.
|
||||||
|
*
|
||||||
|
* @return string The module translated name
|
||||||
*/
|
*/
|
||||||
public static function name(): string
|
public static function name(): string
|
||||||
{
|
{
|
||||||
|
@ -38,12 +45,13 @@ class My
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encode Expired Date settings
|
* Encode Expired Date settings.
|
||||||
*
|
*
|
||||||
* This is saved into post_meta as meta_id value,
|
* This is saved into post_meta as meta_id value,
|
||||||
* so this must be less than 255 caracters.
|
* so this must be less than 255 caracters.
|
||||||
*
|
*
|
||||||
* @param array $in Array of options
|
* @param array $in Array of options
|
||||||
|
*
|
||||||
* @return string "Serialized" options
|
* @return string "Serialized" options
|
||||||
*/
|
*/
|
||||||
public static function encode(array $in): string
|
public static function encode(array $in): string
|
||||||
|
@ -57,9 +65,10 @@ class My
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decode Expired Date settings
|
* Decode Expired Date settings.
|
||||||
*
|
*
|
||||||
* @param string $in "Serialized" options
|
* @param string $in "Serialized" options
|
||||||
|
*
|
||||||
* @return array Array of options
|
* @return array Array of options
|
||||||
*/
|
*/
|
||||||
public static function decode(string $in): array
|
public static function decode(string $in): array
|
||||||
|
|
Loading…
Reference in a new issue