src/Model/Comment.php
public function Replies()
    {
        // No replies if disabled
        if (!$this->getRepliesEnabled()) {
            return new ArrayList();
        }
        $list = $this->AllReplies();

        // Filter spam comments for non-administrators if configured
        $parent = $this->Parent();
        $showSpam = $this->getOption('frontend_spam') && $parent && $parent->canModerateComments();
        if (!$showSpam) {
            $list = $list->filter('IsSpam', 0);
        }

        // Filter un-moderated comments for non-administrators if moderation is enabled
        $showUnmoderated = $parent && (
            ($parent->ModerationRequired === 'None')
            || ($this->getOption('frontend_moderation') && $parent->canModerateComments())
        );
        if (!$showUnmoderated) {
            $list = $list->filter('Moderated', 1);
        }

        $this->extend('updateReplies', $list);
        return $list;
    }
public function Replies()
    {
        // No replies if disabled
        if (!$this->getRepliesEnabled()) {
            return new ArrayList();
        }
        $list = $this->AllReplies();

        // Filter spam comments for non-administrators if configured
        $parent = $this->Parent();
        $showSpam = $this->getOption('frontend_spam') && $parent && $parent->canModerateComments();
        if (!$showSpam) {
            $list = $list->filter('IsSpam', 0);
        }

        // Filter un-moderated comments for non-administrators if moderation is enabled
        $showUnmoderated = $parent && (
            ($parent->ModerationRequired === 'None')
            || ($this->getOption('frontend_moderation') && $parent->canModerateComments())
        );
        if (!$showUnmoderated) {
            $list = $list->filter('Moderated', 1);
        }

        $this->extend('updateReplies', $list);
        return $list;
    }
public function Replies ( ) { // No replies if disabled if ( ! $ this -> getRepliesEnabled ( ) ) { return new ArrayList ( ) ; } $ list = $ this -> AllReplies ( ) ; // Filter spam comments for non-administrators if configured $ parent = $ this -> Parent ( ) ; $ showSpam = $ this -> getOption ( 'frontend_spam' ) && $ parent && $ parent -> canModerateComments ( ) ; if ( ! $ showSpam ) { $ list = $ list -> filter ( 'IsSpam' , 0 ) ; } // Filter un-moderated comments for non-administrators if moderation is enabled $ showUnmoderated = $ parent && ( ( $ parent -> ModerationRequired === 'None' ) || ( $ this -> getOption ( 'frontend_moderation' ) && $ parent -> canModerateComments ( ) ) ) ; if ( ! $ showUnmoderated ) { $ list = $ list -> filter ( 'Moderated' , 1 ) ; } $ this -> extend ( 'updateReplies' , $ list ) ; return $ list ; }
Returns the list of replies, with spam and unmoderated items excluded, for use in the frontend

@return SS_List
Returns the list of replies with spam and unmoderated items excluded for use in the frontend