BlogPostManager
class BlogPostManager extends TranslatableManager implements JQGridInterface
Class BlogPostManager is injected as alligator.blog_post_manager service. BlogPostManager handles the logic for managed entity.
Traits
Properties
| protected BlogPostRepository | $repository | ||
| protected ContainerInterface | $container | ||
| protected BlogCategoryRepository | $blogCategoryRepository | ||
| protected BlogPostContainer | $blogPostContainer |
Methods
Sets the repository request default locale
No description
No description
No description
Get entities from database by ids
No description
Check for all preconditions, create references to all foreign entities and persist new blog post
Find all blog post for blog category using pagination
Find blog post by id
Find cache instance
Find previous and next blog posts
Find blog posts for provided ids
Check for all preconditions, create references to all foreign entities and merge blog post
Find blog post by slug
Find all blog posts
Change current blog category on blog post
Remove blog post from provided array of ids
Find all blog posts using pagination
Count all visible blog posts
Count all visible blog posts for blog category
Find cached or set to cache last 3 blog posts
Find and set to cache last 3 blog posts
Find $itemsNumber number of last blog posts
Dispatch signal to re-cache blog category tree structure
Dispatch signal to re-cache sidebar blog posts
Dispatch signal to re-cache blog posts
Find blog category tree structure
Find all locales
Set data to cache
Dispatch signal to re-cache menu items
Find blog category by slug
Find all blog posts for provided blog category parent id
No description
Details
in TranslatableManager at line 30
setRepositoryLocale(ContainerInterface|null $container)
Sets the repository request default locale
in TranslatableManager at line 63
setRepository(mixed $repository)
in TranslatableManager at line 73
mixed
getLanguagesForIds(array $ids)
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
in BlockElementManagerTrait at line 28
array
getEntitiesForBlockElementsExtension(array $ids)
Get entities from database by ids
in BlockElementManagerTrait at line 40
array
getEntityNamesForIds(array $ids)
Get id and name of entity
at line 63
__construct(BlogPostRepository $repository, ContainerInterface $container, BlogCategoryRepository $blogCategoryRepository, BlogPostContainer $blogPostContainer)
at line 79
object
saveBlogPost(BlogPost $blogPost)
Check for all preconditions, create references to all foreign entities and persist new blog post
at line 125
array
findAllCustomForFrontendByCategory(int $page, int $offset, int $categoryId, int|null $lft = null, int|null $rgt = null)
Find all blog post for blog category using pagination
at line 138
mixed
findOneById(int $id)
Find blog post by id
at line 147
object
getCache()
Find cache instance
at line 161
mixed
findThreeByIdCustomForSingleBlog(int $blogPostId, string $locale = null)
Find previous and next blog posts
at line 184
mixed
findPrevNextCustomForIds(int $prevId, int $nextId)
Find blog posts for provided ids
at line 197
stdClass
editBlogPost(BlogPost $blogPost)
Check for all preconditions, create references to all foreign entities and merge blog post
at line 262
array
findOneBySlugCustomForSingleBlog(string $slug, string|null $locale = null)
Find blog post by slug
at line 273
array
findAll()
Find all blog posts
at line 288
BlogPost
setNewBlogCategory(BlogPost $blogPost, BlogPost $blogPostTemp)
Change current blog category on blog post
at line 311
array
deleteBlogPosts(array $blogPostIds)
Remove blog post from provided array of ids
at line 344
mixed
findAllCustomForFrontend(int $page, int $offset)
Find all blog posts using pagination
at line 355
array
countPostsPagination()
Count all visible blog posts
at line 371
array
countPostsPaginationByCategory(int $id, int|null $lft = null, int|null $rgt = null)
Count all visible blog posts for blog category
at line 387
mixed
getLastNPosts(string $theme, string $locale)
Find cached or set to cache last 3 blog posts
at line 407
mixed
setLastNBlogPostForFrontend(mixed $theme, string $locale)
Find and set to cache last 3 blog posts
at line 438
array
getLastNPostsFromDB(int $itemsNumber, mixed $locale = null)
Find $itemsNumber number of last blog posts
at line 447
dispatchTeeGenerateSignal(string $locale)
Dispatch signal to re-cache blog category tree structure
at line 457
dispatchSidebarBlogsEvent(string $theme, string $locale)
Dispatch signal to re-cache sidebar blog posts
at line 468
dispatchBlogNewsSignalEvent(string $theme, string $locale)
Dispatch signal to re-cache blog posts
at line 479
array|string
getAllTreeCategoriesForCategoryAddTree(string|null $locale = null)
Find blog category tree structure
at line 488
array
getAllLocales()
Find all locales
at line 498
setDataToCache(string $data, string $locale)
Set data to cache
at line 509
dispatchMenuUpdateRemoveSignal(int $id, string $slug, string|null $name = null)
Dispatch signal to re-cache menu items
at line 526
mixed
findCategoryBySlug(string $slug, string|null $locale = null)
Find blog category by slug
at line 542
mixed
getIsotopeCategories(int $id, string $locale, object|null $additionalData = null)
Find all blog posts for provided blog category parent id
at line 551
dispatchBlogPostActionEvent(BlogPost $blogPost)
Dispatch blog post action (save, edit) event