class StaticPageManager extends TranslatableManager implements JQGridInterface

Class StaticPageManager is injected as alligator.static_page_manager service. StaticPageManager handles the logic for entity.

Traits

Trait JQGridManagerTrait
Class BlockElementManagerTrait. Handles reading data for block elements

Properties

protected StaticPageRepository $repository
protected ContainerInterface $container
protected StaticPageCategoryRepository $staticPageCategoryRepository
protected StaticPageContainer $staticPageContainer

Methods

setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

setRepository(mixed $repository)

No description

mixed
getLanguagesForIds(array $ids)

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
getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

array
getEntityNamesForIds(array $ids)

Get id and name of entity

__construct(StaticPageRepository $repository, ContainerInterface $container, StaticPageCategoryRepository $staticPageCategoryRepository, StaticPageContainer $staticPageContainer)

No description

object
saveStaticPage(StaticPage $staticPage)

Save new Static Page

array
findAllCustomForFrontendByCategory(int $page, int $offset, int $categoryId)

Get multiple static pages for specified category

findOneById(int $id)

Get single Static Page by id

findIdBySlug(string $slug)

Get single Static Page for slug

findCategoryBySlug(string $slug, string|null $locale = null)

Find Static Page Category by slug

object
getCache()

Get shop cache object

array
findThreeByIdCustomForSingleBlog(int $id)

Get static page tree

object
editStaticPage(StaticPage $staticPage)

Merge Static Page

array
findOneBySlugCustomForSingleBlog(mixed $slug, null $locale = null)

Get single static page for specified slug

array
findAll()

Get all static pages

setNewStaticPageCategory(StaticPage $staticPage, StaticPage $staticPageTemp)

Set new category for Static Page

bool
deleteStaticPages(array $ids)

Delete multiple Static Pages

array
findAllCustomForFrontend(int $page, int $offset, null $locale = null)

Get multiple static pages

array
countPostsPagination(null $locale = null)

Get count for visible static pages

array
countPostsPaginationByCategory(int $id)

Get number of static pages for specified category

mixed
getLastNPosts(mixed $theme, string $locale)

Get latest static pages

string
setLastNBlogPostForFrontend(string $theme, string $locale)

Set rendered content for last n pages to cache

dispatchTeeGenerateSignal(string $locale)

Dispatch event to cache category tree for specified locale

dispatchMegamenuSignal(string $theme, string $locale)

Dispatch signal for updating mega menu and cache it

dispatchFooterSignal()

Dispatch signal for updating footer info and cache it

dispatchSidebarBlogsEvent(string $theme, string $locale)

Dispatch event to re cache html content

array|string
getAllTreeCategoriesForCategoryAddTree(string $locale = null)

Get Decorated tree

array
getTreeForMegamenuFromDB(string $locale)

Get data for megamenu

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

Dispatch event for menu builder update

getLanguageRelatedEntity($slug, $locale)

No description

dispatchStaticPageActionEvent(StaticPage $staticPage)

Dispatch blog post action (save, edit) event

Details

in TranslatableManager at line 30
setRepositoryLocale(ContainerInterface|null $container)

Sets the repository request default locale

Parameters

ContainerInterface|null $container

Exceptions

InvalidArgumentException if repository is not an instance of TranslatableRepository

in TranslatableManager at line 63
setRepository(mixed $repository)

Parameters

mixed $repository

in TranslatableManager at line 73
mixed getLanguagesForIds(array $ids)

Parameters

array $ids

Return Value

mixed

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

array getEntitiesForBlockElementsExtension(array $ids)

Get entities from database by ids

Parameters

array $ids

Return Value

array

array getEntityNamesForIds(array $ids)

Get id and name of entity

Parameters

array $ids

Return Value

array

at line 54
__construct(StaticPageRepository $repository, ContainerInterface $container, StaticPageCategoryRepository $staticPageCategoryRepository, StaticPageContainer $staticPageContainer)

Parameters

StaticPageRepository $repository
ContainerInterface $container
StaticPageCategoryRepository $staticPageCategoryRepository
StaticPageContainer $staticPageContainer

at line 72
object saveStaticPage(StaticPage $staticPage)

Save new Static Page

Parameters

StaticPage $staticPage

Return Value

object

Exceptions

ORMException
OptimisticLockException

at line 126
array findAllCustomForFrontendByCategory(int $page, int $offset, int $categoryId)

Get multiple static pages for specified category

Parameters

int $page
  • page of data
int $offset
  • number of static pages per page
int $categoryId
  • id of category

Return Value

array

at line 137
StaticPage findOneById(int $id)

Get single Static Page by id

Parameters

int $id

Return Value

StaticPage

at line 151
StaticPage findIdBySlug(string $slug)

Get single Static Page for slug

Parameters

string $slug

Return Value

StaticPage

Exceptions

NoResultException
NonUniqueResultException

at line 166
StaticPageCategory findCategoryBySlug(string $slug, string|null $locale = null)

Find Static Page Category by slug

Parameters

string $slug
string|null $locale

Return Value

StaticPageCategory

Exceptions

NoResultException
NonUniqueResultException

at line 175
object getCache()

Get shop cache object

Return Value

object

at line 186
array findThreeByIdCustomForSingleBlog(int $id)

Get static page tree

Parameters

int $id

Return Value

array

at line 199
object editStaticPage(StaticPage $staticPage)

Merge Static Page

Parameters

StaticPage $staticPage

Return Value

object

Exceptions

ORMException

at line 261
array findOneBySlugCustomForSingleBlog(mixed $slug, null $locale = null)

Get single static page for specified slug

Parameters

mixed $slug
null $locale

Return Value

array

at line 270
array findAll()

Get all static pages

Return Value

array

at line 282
StaticPage setNewStaticPageCategory(StaticPage $staticPage, StaticPage $staticPageTemp)

Set new category for Static Page

Parameters

StaticPage $staticPage
StaticPage $staticPageTemp

Return Value

StaticPage

at line 307
bool deleteStaticPages(array $ids)

Delete multiple Static Pages

Parameters

array $ids

Return Value

bool

Exceptions

ORMException

at line 340
array findAllCustomForFrontend(int $page, int $offset, null $locale = null)

Get multiple static pages

Parameters

int $page
  • page of data
int $offset
  • number of static pages per pege
null $locale
  • locale of static pages

Return Value

array

at line 351
array countPostsPagination(null $locale = null)

Get count for visible static pages

Parameters

null $locale
  • locale of static pages

Return Value

array

at line 362
array countPostsPaginationByCategory(int $id)

Get number of static pages for specified category

Parameters

int $id

Return Value

array

at line 374
mixed getLastNPosts(mixed $theme, string $locale)

Get latest static pages

Parameters

mixed $theme
string $locale

Return Value

mixed

at line 392
string setLastNBlogPostForFrontend(string $theme, string $locale)

Set rendered content for last n pages to cache

Parameters

string $theme
string $locale

Return Value

string

at line 418
dispatchTeeGenerateSignal(string $locale)

Dispatch event to cache category tree for specified locale

Parameters

string $locale

at line 429
dispatchMegamenuSignal(string $theme, string $locale)

Dispatch signal for updating mega menu and cache it

Parameters

string $theme
string $locale

at line 437
dispatchFooterSignal()

Dispatch signal for updating footer info and cache it

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

Dispatch event to re cache html content

Parameters

string $theme
string $locale

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

Get Decorated tree

Parameters

string $locale

Return Value

array|string

at line 470
array getTreeForMegamenuFromDB(string $locale)

Get data for megamenu

Parameters

string $locale

Return Value

array

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

Dispatch event for menu builder update

Parameters

int $id
string $slug
null $name

at line 492
getLanguageRelatedEntity($slug, $locale)

Parameters

$slug
$locale

at line 508
dispatchStaticPageActionEvent(StaticPage $staticPage)

Dispatch blog post action (save, edit) event

Parameters

StaticPage $staticPage