class BlogCommentContainer

Class BlogCommentContainer is injected as alligator.blog.comment.event.container. This container is connecting BlogComment manager to other services

Methods

__construct(ContainerInterface $container)

BlogCommentContainer constructor.

ContainerInterface
getContainer()

No description

User|null
getLoggedUser()

Find logged user, null if user not logged

void
setIfItsLoggedUser(BlogComment $blogComment)

Set user to blog comment if has logged user

prepareSaveBlogComment(BlogComment $blogComment, BlogPostContainer $blogPostContainer)

Prepare blog comment for persisting. Set default fields and create reference for foreign entities

prepareForEditComment(BlogComment $blogComment)

Prepare blog comment for merging. Dispatch alligator.blog.comment.edit.event event

prepareForDeleteComment(BlogComment $blogComment, BlogPostContainer $blogPostContainer)

Prepare blog comment for removing. Dispatch alligator.blog.comment.delete.event

Details

at line 33
__construct(ContainerInterface $container)

BlogCommentContainer constructor.

Parameters

ContainerInterface $container

at line 41
ContainerInterface getContainer()

Return Value

ContainerInterface

at line 50
BlogPostContainer getBlogPostContainer()

Return Value

BlogPostContainer

at line 59
User|null getLoggedUser()

Find logged user, null if user not logged

Return Value

User|null

at line 74
void setIfItsLoggedUser(BlogComment $blogComment)

Set user to blog comment if has logged user

Parameters

BlogComment $blogComment

Return Value

void

at line 87
prepareSaveBlogComment(BlogComment $blogComment, BlogPostContainer $blogPostContainer)

Prepare blog comment for persisting. Set default fields and create reference for foreign entities

Parameters

BlogComment $blogComment
BlogPostContainer $blogPostContainer

at line 101
prepareForEditComment(BlogComment $blogComment)

Prepare blog comment for merging. Dispatch alligator.blog.comment.edit.event event

Parameters

BlogComment $blogComment

at line 111
prepareForDeleteComment(BlogComment $blogComment, BlogPostContainer $blogPostContainer)

Prepare blog comment for removing. Dispatch alligator.blog.comment.delete.event

Parameters

BlogComment $blogComment
BlogPostContainer $blogPostContainer