CoolCMS API

EventDetailTrait uses trait:short, trait:short, trait:short

Table of Contents

Constants

BLOG_LIST_ARTICLE  : mixed = 'article'
BLOG_LIST_EVENT  : mixed = 'event'
BLOG_LIST_NEWS  : mixed = 'news'

Methods

actionDetail()  : void
renderDetail()  : void
blogListParams()  : array<string, mixed>
Link parameters for a list with a category and a preserved region (same rule as in Bazaar): with a region selected the category segment is always explicit (`-` means none), otherwise the region in the URL would shift into the category position. Without a region nothing changes.
blogListTarget()  : array{0: string, 1: int}
blogListTargetForPage()  : array{0: string, 1: int}
Target by the current page (for components without an item): news are pages 52/53, events 54/55, otherwise articles.
blogRegionLinks()  : array<int, string>
Links to the list of the same type filtered by the item region (`/clanky/-/<region>`).
prepareOgDataForDetail()  : void
prepareOgDataForList()  : void
visibleGalleries()  : array<int, Gallery>
{@see Gallery::isVisibleFor()}: active, published, `onlyForLogged` only for a logged-in visitor.

Constants

Methods

actionDetail()

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

renderDetail()

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

blogListParams()

Link parameters for a list with a category and a preserved region (same rule as in Bazaar): with a region selected the category segment is always explicit (`-` means none), otherwise the region in the URL would shift into the category position. Without a region nothing changes.

protected blogListParams(int $slug, int|null $categoryId, string|int|null $regionId) : array<string, mixed>
Parameters
$slug : int
$categoryId : int|null
$regionId : string|int|null
Return values
array<string, mixed>

blogListTarget()

protected blogListTarget(string $type) : array{0: string, 1: int}
Parameters
$type : string

BLOG_LIST_* by item type

Return values
array{0: string, 1: int} —

[link target, page id (route slug)]

blogListTargetForPage()

Target by the current page (for components without an item): news are pages 52/53, events 54/55, otherwise articles.

protected blogListTargetForPage(object|null $presenter) : array{0: string, 1: int}
Parameters
$presenter : object|null
Return values
array{0: string, 1: int} —

[link target, page id (route slug)]

Links to the list of the same type filtered by the item region (`/clanky/-/<region>`).

protected blogRegionLinks(Presenter|null $presenter, string $type, iterable<string|int, BlogContentInterface> $items[, RouterDispatcher|null $dispatcher = null ]) : array<int, string>

An item without a region (or without the region.translations include) is missing from the result. Region names in the URL are preloaded from already loaded entities (no query per region).

Parameters
$presenter : Presenter|null
$type : string
$items : iterable<string|int, BlogContentInterface>

articles / news / events

$dispatcher : RouterDispatcher|null = null
Return values
array<int, string> —

[item id => URL]

prepareOgDataForDetail()

private prepareOgDataForDetail([BlogContentInterface|null $entity = null ][, string $titleFnc = "" ][, string $textFnc = "" ]) : void
Parameters
$entity : BlogContentInterface|null = null
$titleFnc : string = ""
$textFnc : string = ""

prepareOgDataForList()

private prepareOgDataForList([Category|null $category = null ]) : void
Parameters
$category : Category|null = null

visibleGalleries()

{@see Gallery::isVisibleFor()}: active, published, `onlyForLogged` only for a logged-in visitor.

private visibleGalleries(array<string|int, mixed> $galleries) : array<int, Gallery>
Parameters
$galleries : array<string|int, mixed>
Return values
array<int, Gallery>
On this page

Search results