class BlogCategoryManager extends CategoryTranslatableManager implements JQGridInterface

Class BlogCategoryManager is injected as alligator.blog_category_manager service. BlogCategoryManager handles the logic for managed entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

Properties

protected BlogCategoryRepository $repository
protected BlogCategoryContainer $container
protected Router $router
protected array $leafsArray

Methods

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

setRepository(mixed $repository)

No description

mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

No description

mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

No description

array|mixed
getEntitiesForBlockElementsExtension(array $ids, int $numbOfPosts)

Find BlogCategory with related BlogPost for provided array of ids

array
getEntityNamesForIds(array $ids)

Get id and name of entity

__construct(BlogCategoryRepository $repository, BlogCategoryContainer $container, Router $router)

BlogCategoryManager constructor.

saveBlogCategory(BlogCategory $category)

Check for all preconditions, create references to all foreign entities and persist new blog category

array|string
getAllTreeCategoriesForCategoryAddTree(string|null $locale = null)

Find blog category tree structure

object
saveBlogCategoryForAdd(BlogCategory $category)

Persist new blog category

array|string
getAllBlogCategoriesForSidebar(string $locale)

Find all blog categories for specific locale

string
getCatsAsTreeForBackend()

Find blog category tree structure as string representation

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

Set blog categories tree structure to cache

mixed
findOneById(int $id)

Find blog category by id

object
edit(BlogCategory $blogCategory, bool $positionChanged, mixed $previous)

Check for all preconditions, create references to all foreign entities and merge blog category

int
deleteBlogCategories(array $blogCategoriesIdArray)

Removes BlogCategory from provided array

dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

dispatchBlogNewsSignalEvent(string $theme, string $locale)

Dispatch signal to re-cache blog posts

dispatchSidebarBlogsEvent(string $theme, string $locale)

Dispatch signal to re-cache blog categories for sidebar

mixed
getCashCategoryTree()

Return cached blog categories tree

mixed
setBlogNewsForFrontend(string $theme, string $locale)

Find and sets rendered blog posts to cache for specific locale

mixed
getNewsFromCache(string $theme, string $locale)

Find cached or cache rendered blog posts for specific locale

array
getNewsFromDB(int $itemsNumber)

Find BlogCategory with related BlogPosts

array
getAllLanguages()

Find all languages

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
hasRootCategory()

Find root node

Details

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

Parameters

ContainerInterface|null $container

Exceptions

InvalidArgumentException if repository is not an instance of TranslatableRepository

setRepository(mixed $repository)

Parameters

mixed $repository

in JQGridManagerTrait at line 26
mixed searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

array $searchParams
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 40
mixed findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

Parameters

int $page
int $offset
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

mixed

in JQGridManagerTrait at line 53
mixed getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)

Parameters

array|null $searchParams
array|null $sortParams
array|null $additionalParams
JQGridWrapper|null $jqGridWrapper

Return Value

mixed

at line 452
array|mixed getEntitiesForBlockElementsExtension(array $ids, int $numbOfPosts)

Find BlogCategory with related BlogPost for provided array of ids

Parameters

array $ids
int $numbOfPosts

Return Value

array|mixed

See also

BlogCategory
BlogPost

array getEntityNamesForIds(array $ids)

Get id and name of entity

Parameters

array $ids

Return Value

array

at line 60
__construct(BlogCategoryRepository $repository, BlogCategoryContainer $container, Router $router)

BlogCategoryManager constructor.

Parameters

BlogCategoryRepository $repository
BlogCategoryContainer $container
Router $router

at line 73
BlogCategory saveBlogCategory(BlogCategory $category)

Check for all preconditions, create references to all foreign entities and persist new blog category

Parameters

BlogCategory $category

Return Value

BlogCategory

at line 96
array|string getAllTreeCategoriesForCategoryAddTree(string|null $locale = null)

Find blog category tree structure

Parameters

string|null $locale

Return Value

array|string

at line 122
object saveBlogCategoryForAdd(BlogCategory $category)

Persist new blog category

Parameters

BlogCategory $category

Return Value

object

at line 155
array|string getAllBlogCategoriesForSidebar(string $locale)

Find all blog categories for specific locale

Parameters

string $locale

Return Value

array|string

See also

BlogCategory

at line 192
string getCatsAsTreeForBackend()

Find blog category tree structure as string representation

Return Value

string

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

Set blog categories tree structure to cache

Parameters

string $data
string|null $locale

Return Value

mixed

at line 219
mixed findOneById(int $id)

Find blog category by id

Parameters

int $id

Return Value

mixed

See also

BlogCategory

at line 232
object edit(BlogCategory $blogCategory, bool $positionChanged, mixed $previous)

Check for all preconditions, create references to all foreign entities and merge blog category

Parameters

BlogCategory $blogCategory
bool $positionChanged
mixed $previous

Return Value

object

at line 294
int deleteBlogCategories(array $blogCategoriesIdArray)

Removes BlogCategory from provided array

Parameters

array $blogCategoriesIdArray

Return Value

int

Exceptions

ORMException

See also

BlogCategory

at line 326
dispatchTeeGenerateSignal(string $locale)

Dispatch signal to re-cache blog category tree structure

Parameters

string $locale

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

Dispatch signal to re-cache blog posts

Parameters

string $theme
string $locale

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

Dispatch signal to re-cache blog categories for sidebar

Parameters

string $theme
string $locale

at line 354
mixed getCashCategoryTree()

Return cached blog categories tree

Return Value

mixed

at line 368
mixed setBlogNewsForFrontend(string $theme, string $locale)

Find and sets rendered blog posts to cache for specific locale

Parameters

string $theme
string $locale

Return Value

mixed

See also

BlogPost

at line 397
mixed getNewsFromCache(string $theme, string $locale)

Find cached or cache rendered blog posts for specific locale

Parameters

string $theme
string $locale

Return Value

mixed

at line 415
array getNewsFromDB(int $itemsNumber)

Find BlogCategory with related BlogPosts

Parameters

int $itemsNumber

Return Value

array

See also

BlogCategory
BlogPost

at line 426
array getAllLanguages()

Find all languages

Return Value

array

See also

Language

at line 437
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 464
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 475
mixed hasRootCategory()

Find root node

Return Value

mixed

See also

BlogCategory