MessageDetailTrait
Table of Contents
Properties
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
$advertLinksConfig
public
AdvertLinksConfig
$advertLinksConfig
Attributes
- #[Inject]
$linksPaymentItemManager
public
PaymentItemManager
$linksPaymentItemManager
Attributes
- #[Inject]
Methods
actionDetail()
public
actionDetail(string|int|null $slug, int $id, string $loc) : void
Parameters
- $slug : string|int|null
- $id : int
- $loc : string
createComponentSocialsShare()
public
createComponentSocialsShare() : SocialsShare
Return values
SocialsShareprepareUserForDetail()
public
prepareUserForDetail() : void
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>hasPaidLinks()
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
boolhideMessageDetail()
private
hideMessageDetail() : void
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
boolprepareOgDataForDetail()
private
prepareOgDataForDetail([Message|null $message = null ]) : void
Parameters
- $message : Message|null = null