class BlogPostContainer

Class BlogPostContainer is injected as alligator.blog.post.event.container. This container is connecting BlogPost manager to other services

Traits

Class LanguageEntityRelationshipEventContainerTrait. Defines methods for event containers of entities that can be have language dependent relationship

Constants

BLOG_POST_LASTN_FRONTEND_CACHE

Key for caching latest blog posts

Methods

mixed
dispatchLanguageRelatedEntityEvent(string $class, array $paramBag, string $locale)

No description

__construct(ContainerInterface $container)

BlogPostContainer constructor.

prepareSaveBlogPost(BlogPost $blogPost)

Dispatch event for prepare save blog post

prepareEditBlogPost(BlogPost $blogPost)

Dispatch event for prepare edit blog post

Translator
getTranslator()

No description

getImageManager()

No description

User|null
getLoggedUser()

Get logget user, null if not logged

void
setLoggedUserToBlogPost(BlogPost $blogPost)

Sets a logged user on blog post

dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

mixed
dispatchFindPrevAndNext(int $blogPostId)

Dispatch find custom logic for previous and next blog post

prepareForDeleteBlogPost(array $blogPostArray)

Remove all comments from blog post and remove it from blog category

object
getCache()

Get reference on cache client

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

Set latest blog posts to cache

dispatchBlogSidebarSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache sidebar blog categories

dispatchBlogNewsSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache latest blog posts

mixed
getTemplating()

No description

mixed
checkIfBlogSidebarIsCached(string|null $locale = null)

Check if blog sidebar is cached

setNewRequest()

Set new request

array
getAllLocales()

Find all locales

mixed
setDataToCache(string $data, string $key)

Set data to cache for provided key

ContainerInterface
getContainer()

No description

setContainer(ContainerInterface $container)

No description

bool
checkIfPermalinkIsAvailable(string $permalink)

Check if permalink is valid

dispatchBlogPostActionEvent(BlogPost $blogPost)

Dispatch blog post action (save, edit) event

Details

mixed dispatchLanguageRelatedEntityEvent(string $class, array $paramBag, string $locale)

Parameters

string $class
array $paramBag
string $locale

Return Value

mixed

at line 49
__construct(ContainerInterface $container)

BlogPostContainer constructor.

Parameters

ContainerInterface $container

at line 57
BlogPostManager getBlogPostManager()

Return Value

BlogPostManager

at line 65
prepareSaveBlogPost(BlogPost $blogPost)

Dispatch event for prepare save blog post

Parameters

BlogPost $blogPost

at line 74
prepareEditBlogPost(BlogPost $blogPost)

Dispatch event for prepare edit blog post

Parameters

BlogPost $blogPost

at line 82
Translator getTranslator()

Return Value

Translator

at line 89
ImageManager getImageManager()

Return Value

ImageManager

at line 97
User|null getLoggedUser()

Get logget user, null if not logged

Return Value

User|null

at line 114
void setLoggedUserToBlogPost(BlogPost $blogPost)

Sets a logged user on blog post

Parameters

BlogPost $blogPost

Return Value

void

See also

User

at line 125
dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

Parameters

string $locale

at line 136
mixed dispatchFindPrevAndNext(int $blogPostId)

Dispatch find custom logic for previous and next blog post

Parameters

int $blogPostId

Return Value

mixed

at line 152
prepareForDeleteBlogPost(array $blogPostArray)

Remove all comments from blog post and remove it from blog category

Parameters

array $blogPostArray

See also

BlogPostManager
BlogCategory
BlogComment

at line 164
BlogCategoryManager getBlogCategoryManager()

Return Value

BlogCategoryManager

at line 173
object getCache()

Get reference on cache client

Return Value

object

at line 185
mixed setLastNBlogPostForFrontend(string $data, string|null $locale = null)

Set latest blog posts to cache

Parameters

string $data
string|null $locale

Return Value

mixed

at line 197
BlogPostSidebarSignalEvent dispatchBlogSidebarSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache sidebar blog categories

Parameters

string $theme
string $locale

Return Value

BlogPostSidebarSignalEvent

at line 207
dispatchBlogNewsSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache latest blog posts

Parameters

string $theme
string $locale

at line 215
mixed getTemplating()

Return Value

mixed

at line 226
mixed checkIfBlogSidebarIsCached(string|null $locale = null)

Check if blog sidebar is cached

Parameters

string|null $locale

Return Value

mixed

at line 234
setNewRequest()

Set new request

at line 243
array getAllLocales()

Find all locales

Return Value

array

at line 255
mixed setDataToCache(string $data, string $key)

Set data to cache for provided key

Parameters

string $data
string $key

Return Value

mixed

at line 263
ContainerInterface getContainer()

Return Value

ContainerInterface

at line 271
setContainer(ContainerInterface $container)

Parameters

ContainerInterface $container

at line 282
bool checkIfPermalinkIsAvailable(string $permalink)

Check if permalink is valid

Parameters

string $permalink

Return Value

bool

at line 291
dispatchBlogPostActionEvent(BlogPost $blogPost)

Dispatch blog post action (save, edit) event

Parameters

BlogPost $blogPost