class BlogCategoryContainer

Class BlogCategoryContainer is injected as alligator.blog.category.event.container. This container is connecting BlogCategory manager to other services

Constants

BLOG_CATEGORY_SIDE_BAR_CACHE

Key for caching sidebar blog categories

BLOG_NEWS_CACHE

Key for caching latest blog posts

Methods

__construct(ContainerInterface $container)

BlogCategoryContainer constructor.

getBlogPostContainer()

Get reference to blog post container

prepareSaveBlogCategory(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for persisting. Hook on blog.category.save.action event

prepareEditBlogCategory(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for merging. Hook on blog.category.edit.action event

prepareBlogCategoryForDelete(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for removing. Hook blog.category.delete.action event

dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

dispatchRemoveImagesForDeletedCategories(array $imagesIds)

Remove images for deleted blog category

mixed
setCashCategoryTree(mixed $data, string|null $locale = null)

Set blog categories to cache

mixed
getCashCategoryTree()

Get blog categories from cache

mixed
getTemplating()

Get templating engine

object
getCache()

Get reference to cache client

mixed
setNewsToCache(mixed $data, string|null $locale = null)

Set latest blog posts to cache

dispatchBlogNewsSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache blog posts

dispatchSidebarBlogsEvent(string $theme, string $locale)

Dispatch signal to re-cache sidebar blog categories

mixed
getCachedNews(string|null $locale = null)

Get cached latest blog post

mixed
getCurrentLocale()

Get current locale

setNewRequest()

Set new request

string
getSlug()

Get current slug from request

array
getAllLanguages()

Find all languages

ContainerInterface
getContainer()

No description

setContainer(ContainerInterface $container)

No description

dispatchMenuUpdateRemoveSignal(int $id, string $slug, string|null $name = null)

Dispatch signal to re-cache menu items

mixed
getIsotopeCategories(int $id, string $locale)

Find all blog posts for provided blog category parent id

mixed
dispatchBlogCategoriesDecoratorEvent(string $locale)

Get custom blog category decorator. Hook on custom.blog_category.decorator.event event

boolean
checkIfPermalinkIsAvailable(string $permalink)

Validate permalink

Details

at line 55
__construct(ContainerInterface $container)

BlogCategoryContainer constructor.

Parameters

ContainerInterface $container

at line 66
BlogPostContainer getBlogPostContainer()

Get reference to blog post container

Return Value

BlogPostContainer

See also

BlogPostContainer

at line 76
prepareSaveBlogCategory(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for persisting. Hook on blog.category.save.action event

Parameters

BlogCategory $blogCategory
BlogPostContainer $blogPostContainer

at line 86
prepareEditBlogCategory(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for merging. Hook on blog.category.edit.action event

Parameters

BlogCategory $blogCategory
BlogPostContainer $blogPostContainer

at line 96
prepareBlogCategoryForDelete(BlogCategory $blogCategory, BlogPostContainer $blogPostContainer)

Prepare blog category for removing. Hook blog.category.delete.action event

Parameters

BlogCategory $blogCategory
BlogPostContainer $blogPostContainer

at line 109
BlogCategoryTreeSignalEvent dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

Parameters

string $locale

Return Value

BlogCategoryTreeSignalEvent

See also

BlogCategory

at line 120
dispatchRemoveImagesForDeletedCategories(array $imagesIds)

Remove images for deleted blog category

Parameters

array $imagesIds

See also

BlogCategory

at line 134
mixed setCashCategoryTree(mixed $data, string|null $locale = null)

Set blog categories to cache

Parameters

mixed $data
string|null $locale

Return Value

mixed

See also

BlogCategory

at line 145
mixed getCashCategoryTree()

Get blog categories from cache

Return Value

mixed

See also

BlogCategory

at line 156
mixed getTemplating()

Get templating engine

Return Value

mixed

See also

TwigEngine

at line 165
object getCache()

Get reference to cache client

Return Value

object

at line 179
mixed setNewsToCache(mixed $data, string|null $locale = null)

Set latest blog posts to cache

Parameters

mixed $data
string|null $locale

Return Value

mixed

See also

BlogPost

at line 192
NewsEventSignalEvent dispatchBlogNewsSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache blog posts

Parameters

string $theme
string $locale

Return Value

NewsEventSignalEvent

at line 202
dispatchSidebarBlogsEvent(string $theme, string $locale)

Dispatch signal to re-cache sidebar blog categories

Parameters

string $theme
string $locale

at line 215
mixed getCachedNews(string|null $locale = null)

Get cached latest blog post

Parameters

string|null $locale

Return Value

mixed

See also

BlogPost

at line 224
mixed getCurrentLocale()

Get current locale

Return Value

mixed

at line 232
setNewRequest()

Set new request

at line 241
string getSlug()

Get current slug from request

Return Value

string

at line 250
array getAllLanguages()

Find all languages

Return Value

array

at line 258
ContainerInterface getContainer()

Return Value

ContainerInterface

at line 266
setContainer(ContainerInterface $container)

Parameters

ContainerInterface $container

at line 277
dispatchMenuUpdateRemoveSignal(int $id, string $slug, string|null $name = null)

Dispatch signal to re-cache menu items

Parameters

int $id
string $slug
string|null $name

at line 289
mixed getIsotopeCategories(int $id, string $locale)

Find all blog posts for provided blog category parent id

Parameters

int $id
string $locale

Return Value

mixed

at line 300
mixed dispatchBlogCategoriesDecoratorEvent(string $locale)

Get custom blog category decorator. Hook on custom.blog_category.decorator.event event

Parameters

string $locale

Return Value

mixed

at line 311
boolean checkIfPermalinkIsAvailable(string $permalink)

Validate permalink

Parameters

string $permalink

Return Value

boolean