BlogCategoryExtension
class BlogCategoryExtension extends Twig_Extension
Class BlogCategoryExtension is injected as twig.extension.blog.category service. BlogCategoryExtension handles the logic and provides necessary data for managed entity in twig.
Properties
| protected BlogCategoryManager | $categoryManager |
Methods
getFunctions()
{@inheritdoc}
array|mixed
getTreeCategories(string $locale)
Find and cache blog categories
mixed
getNewsFromCache(string $theme, string $locale)
Find blog posts
setTreeCategoriesToCache(string $locale)
Find and cache blog categories
array
getCategoryWithNPosts(array $ids, int $numbOfPosts)
Find blog category with blog posts
mixed
getIsotopeCategories(int $id, string $locale = null)
Find all blog posts for provided blog category parent id
string
getName()
Returns the name of the extension.
Details
at line 37
__construct(BlogCategoryManager $categoryManager)
Constructor
at line 45
getFunctions()
{@inheritdoc}
at line 63
array|mixed
getTreeCategories(string $locale)
Find and cache blog categories
at line 82
mixed
getNewsFromCache(string $theme, string $locale)
Find blog posts
at line 93
setTreeCategoriesToCache(string $locale)
Find and cache blog categories
at line 110
array
getCategoryWithNPosts(array $ids, int $numbOfPosts)
Find blog category with blog posts
at line 125
mixed
getIsotopeCategories(int $id, string $locale = null)
Find all blog posts for provided blog category parent id
at line 135
string
getName()
Returns the name of the extension.