CoolCMS API

RenderInitTrait uses trait:short

Table of Contents

Constants

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

Methods

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>`).
intilializeRender()  : void

Constants

Methods

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]

intilializeRender()

private intilializeRender([array<string|int, mixed> $items = [] ][, array<int, array<string, string>> $highlights = [] ]) : void
Parameters
$items : array<string|int, mixed> = []
$highlights : array<int, array<string, string>> = []

highlighted snippets (article id => field => safe HTML), see ArticleListRenderer::render()

On this page

Search results