CoolCMS API

MessageDetailTrait

Table of Contents

Properties

$advertLinksConfig  : AdvertLinksConfig
$linksPaymentItemManager  : PaymentItemManager

Methods

actionDetail()  : void
createComponentSocialsShare()  : SocialsShare
prepareUserForDetail()  : void
renderDetail()  : void
collectMessageVisibilityIssues()  : array<int, string>
Returns the reasons why the post is not publicly visible; an empty array means the post is fine.
hasPaidLinks()  : bool
True when the message has an active, valid item of the "Show links" tariff (`AdvertLinksConfig`, default 4): the text then shows its web addresses as links.
hideMessageDetail()  : void
isMessageAuthor()  : bool
Author is the logged-in user who inserted the post (an anonymous post has no author password).
prepareOgDataForDetail()  : void

Properties

Methods

actionDetail()

public actionDetail(string|int|null $slug, int $id, string $loc) : void
Parameters
$slug : string|int|null
$id : int
$loc : string

renderDetail()

public renderDetail(string|int|null $slug, int $id, string $loc) : void
Parameters
$slug : string|int|null
$id : int
$loc : string

collectMessageVisibilityIssues()

Returns the reasons why the post is not publicly visible; an empty array means the post is fine.

private collectMessageVisibilityIssues(Message $message) : array<int, string>

Keys are the translations notices.hidden.<key>.

Parameters
$message : Message
Return values
array<int, string>

True when the message has an active, valid item of the "Show links" tariff (`AdvertLinksConfig`, default 4): the text then shows its web addresses as links.

private hasPaidLinks(Message $message) : bool
Parameters
$message : Message
Return values
bool

isMessageAuthor()

Author is the logged-in user who inserted the post (an anonymous post has no author password).

private isMessageAuthor(Message $message) : bool
Parameters
$message : Message
Return values
bool
On this page

Search results