Backend\Modules\Blog\Engine\Model::getCommentStatusCount PHP 메소드

getCommentStatusCount() 공개 정적인 메소드

Get a count per comment
public static getCommentStatusCount ( ) : array
리턴 array
    public static function getCommentStatusCount()
    {
        return (array) BackendModel::getContainer()->get('database')->getPairs('SELECT i.status, COUNT(i.id)
             FROM blog_comments AS i
             WHERE i.language = ?
             GROUP BY i.status', array(BL::getWorkingLanguage()));
    }

Usage Example

예제 #1
0
 /**
  * Load the data
  */
 private function loadData()
 {
     $this->comments = BackendBlogModel::getLatestComments('published', 5);
     $this->numCommentStatus = BackendBlogModel::getCommentStatusCount();
 }