EmpireBlogPluginExtension
class EmpireBlogPluginExtension extends Twig_Extension
Class EmpireBlogPluginExtension is injected as alligator.blog_post_extension service. EmpireBlogPluginExtension handles the logic and provides necessary data for managed entity in twig.
Constants
| YOUTUBE_EMBED_CODE |
|
Properties
| protected BlogPostManager | $blogPostManager |
Methods
getFunctions()
{@inheritdoc}
mixed
getLastNPosts(mixed $theme, mixed $locale)
Find and cache 3 last blog posts
mixed
getLastNPostsFromDB(int $numberOfItems, string|null $locale = null)
Find and cache $numberOfItems last blog posts
mixed
getEntitiesForBlockElementsExtension(array $ids)
Find blog post by array of ids
string
formatYoutubeLink(string $link)
Format YouTube link
string
getName()
Returns the name of the extension.
Details
at line 32
__construct(BlogPostManager $blogPostManager)
EmpireBlogPluginExtension constructor.
at line 40
getFunctions()
{@inheritdoc}
at line 61
mixed
getLastNPosts(mixed $theme, mixed $locale)
Find and cache 3 last blog posts
at line 75
mixed
getLastNPostsFromDB(int $numberOfItems, string|null $locale = null)
Find and cache $numberOfItems last blog posts
at line 88
mixed
getEntitiesForBlockElementsExtension(array $ids)
Find blog post by array of ids
at line 99
string
formatYoutubeLink(string $link)
Format YouTube link
at line 118
string
getName()
Returns the name of the extension.