cosmetic (doc)

This commit is contained in:
Jean-Christian Paul Denis 2023-04-23 13:51:30 +02:00
parent 588fc6927e
commit d8206c992e
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
2 changed files with 27 additions and 18 deletions

View File

@ -26,12 +26,12 @@ 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
* *
* @return string * @return string
*/ */
public static function EntryExpiredIf(ArrayObject $attr, string $content): string public static function EntryExpiredIf(ArrayObject $attr, string $content): string
{ {
@ -53,11 +53,11 @@ class FrontendTemplate
} }
/** /**
* Template for expired date * Template for expired date.
* *
* @param ArrayObject $attr Value attributes * @param ArrayObject $attr Value attributes
* *
* @return string * @return string
*/ */
public static function EntryExpiredDate(ArrayObject $attr): string public static function EntryExpiredDate(ArrayObject $attr): string
{ {
@ -79,11 +79,11 @@ class FrontendTemplate
} }
/** /**
* Template for expired time * Template for expired time.
* *
* @param ArrayObject $attr Value attributes * @param ArrayObject $attr Value attributes
* *
* @return string * @return string
*/ */
public static function EntryExpiredTime(ArrayObject $attr): string public static function EntryExpiredTime(ArrayObject $attr): string
{ {

View File

@ -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,13 +45,14 @@ 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,10 +65,11 @@ 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
{ {