src/Extensions/CommentsExtension.php
public function AllComments()
    {
        $order = $this->owner->getCommentsOption('order_comments_by');
        $comments = Comment::get()
            ->filter('ParentID', $this->owner->ID)
            ->sort($order);
        $this->owner->extend('updateAllComments', $comments);
        return $comments;
    }
public function AllComments()
    {
        $order = $this->owner->getCommentsOption('order_comments_by');
        $comments = Comment::get()
            ->filter('ParentID', $this->owner->ID)
            ->sort($order);
        $this->owner->extend('updateAllComments', $comments);
        return $comments;
    }
public function AllComments ( ) { $ order = $ this -> owner -> getCommentsOption ( 'order_comments_by' ) ; $ comments = Comment :: get ( ) -> filter ( 'ParentID' , $ this -> owner -> ID ) -> sort ( $ order ) ; $ this -> owner -> extend ( 'updateAllComments' , $ comments ) ; return $ comments ; }
Returns the RelationList of all comments against this object. Can be used as a data source
for a gridfield with write access.

@return DataList
Returns the RelationList of all comments against this object . Can be used as a data source for a gridfield with write access .