class BlogCommentRepository extends EntityRepository

Class BlogCommentRepository is injected as alligator.blog_comment_repository service. BlogCommentRepository is used for crud operation for managed entity.

Use this class to work with database.

Traits

Trait JQGridTrait

Constants

BLOG_COMMENT_OFFSET

Blog comment offset

ALIAS

Methods

jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

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

JQGrid function

array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

string
getAlias()

Alias for BlogComment

string
getUserAlias()

Alias for User

string
getBlogPostAlias()

Alias for BlogPost

saveComment(BlogComment $blogComment)

Persist new blog comment

array
findOneByIdCustom(int $id)

Find blog comment by id

array
findCommentsForPost(string $slug, int $page)

Find comments for provided post slug

mixed
countCommentsForPost(string $slug)

Count number of comments for post by its slug

bool
editApproveComment(BlogComment $blogComment)

Merge blog comment

bool
updateObjects(User $user)

Update blog comment fields for specific User

array
getAllBlogComments(array $blogCommentsId)

Find blog comment for provided array of ids

mixed
deleteBlogComments(array $blogCommentsIds)

Remove blog comment for provided array of ids

Details

in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 61
array findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)

JQGrid function

Parameters

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

Return Value

array

in JQGridTrait at line 94
array searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

Parameters

array $searchParams
array $sortParams
bool $isCountSearch
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

array

at line 38
string getAlias()

Alias for BlogComment

Return Value

string

See also

BlogComment

at line 49
string getUserAlias()

Alias for User

Return Value

string

See also

User

at line 60
string getBlogPostAlias()

Alias for BlogPost

Return Value

string

See also

BlogPost

at line 77
BlogComment saveComment(BlogComment $blogComment)

Persist new blog comment

Parameters

BlogComment $blogComment

Return Value

BlogComment

Exceptions

ORMException
OptimisticLockException

at line 93
array findOneByIdCustom(int $id)

Find blog comment by id

Parameters

int $id

Return Value

array

See also

BlogComment

at line 125
array findCommentsForPost(string $slug, int $page)

Find comments for provided post slug

Parameters

string $slug
int $page

Return Value

array

See also

BlogComment
BlogPost

at line 162
mixed countCommentsForPost(string $slug)

Count number of comments for post by its slug

Parameters

string $slug

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 181
bool editApproveComment(BlogComment $blogComment)

Merge blog comment

Parameters

BlogComment $blogComment

Return Value

bool

at line 208
bool updateObjects(User $user)

Update blog comment fields for specific User

Parameters

User $user

Return Value

bool

at line 238
array getAllBlogComments(array $blogCommentsId)

Find blog comment for provided array of ids

Parameters

array $blogCommentsId

Return Value

array

See also

BlogComment

at line 259
mixed deleteBlogComments(array $blogCommentsIds)

Remove blog comment for provided array of ids

Parameters

array $blogCommentsIds

Return Value

mixed

See also

BlogComment