Updated: Comment #8
Problem/Motivation
Function comment_count_unpublished()
is used only as title of local task UnapprovedComments
(added in #2032309: Use local tasks derivatives to provide local tasks for views
) and does not support a swapable comment storage, because could not be overriden
Proposed resolution
Implement CommentManagerInterface::getUnapprovedCount()
that uses EntityQuery
to count unapproved comments
API changes
remove comment_count_unpublished()
add CommentManagerInterface::getUnapprovedCount()
Original report by @andypost
Follow-up from #1978904: Convert comment_admin() to a Controller
Also usage of the function ('title callback' => 'comment_count_unpublished',
) should be replaced with proper method in AdminController