cosmetic (doc)
This commit is contained in:
parent
588fc6927e
commit
d8206c992e
2 changed files with 27 additions and 18 deletions
|
@ -26,12 +26,12 @@ use dcTemplate;
|
|||
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 string $content Block content
|
||||
* @param ArrayObject $attr Block attributes
|
||||
* @param string $content Block content
|
||||
*
|
||||
* @return string
|
||||
* @return 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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
|
25
src/My.php
25
src/My.php
|
@ -16,13 +16,18 @@ namespace Dotclear\Plugin\postExpired;
|
|||
|
||||
use dcCore;
|
||||
|
||||
/**
|
||||
* Module definiton shortcut.
|
||||
*/
|
||||
class My
|
||||
{
|
||||
/** @var string This plugin meta type */
|
||||
public const META_TYPE = 'post_expired';
|
||||
|
||||
/**
|
||||
* This module id
|
||||
* This module id.
|
||||
*
|
||||
* @return string The module id
|
||||
*/
|
||||
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
|
||||
{
|
||||
|
@ -38,13 +45,14 @@ class My
|
|||
}
|
||||
|
||||
/**
|
||||
* Encode Expired Date settings
|
||||
* Encode Expired Date settings.
|
||||
*
|
||||
* This is saved into post_meta as meta_id value,
|
||||
* so this must be less than 255 caracters.
|
||||
*
|
||||
* @param array $in Array of options
|
||||
* @return string "Serialized" options
|
||||
* @param array $in Array of options
|
||||
*
|
||||
* @return string "Serialized" options
|
||||
*/
|
||||
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
|
||||
* @return array Array of options
|
||||
* @param string $in "Serialized" options
|
||||
*
|
||||
* @return array Array of options
|
||||
*/
|
||||
public static function decode(string $in): array
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue