ArticleDetailTrait 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
- createComponentFrontBlogArticleRating() : Rating
- 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
BLOG_LIST_ARTICLE
protected
mixed
BLOG_LIST_ARTICLE
= 'article'
BLOG_LIST_EVENT
protected
mixed
BLOG_LIST_EVENT
= 'event'
BLOG_LIST_NEWS
protected
mixed
BLOG_LIST_NEWS
= 'news'
Methods
actionDetail()
public
actionDetail(string|int|null $slug, int $id, string $loc) : void
Parameters
- $slug : string|int|null
- $id : int
- $loc : string
createComponentFrontBlogArticleRating()
public
createComponentFrontBlogArticleRating() : Rating
Return values
RatingrenderDetail()
public
renderDetail(string|int|null $slug, int $id, string $loc) : void
Parameters
- $slug : string|int|null
- $id : int
- $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)]
blogRegionLinks()
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>