public function getComments()
    {
        //setup the comments
        $comment_ids = $this->getIds('comment');

        $comments = array();

        //only shows comments if there are comment_ids in the story
        //body or if the story has directly been commented on
        if (!empty($comment_ids)) {
            sort($comment_ids);
            $size = 0;
            foreach ($comment_ids as $id) {
                if (isset($this->_loaded_nodes[$id])) {
                    $comment = $this->_loaded_nodes[$id];
                    if ($comment instanceof ComBaseDomainEntityComment) {
                        $comments[$id] = $comment;
                        ++$size;
                    }
                }
                if ($size == 10) {
                    break;
                }
            }
        }

        return $comments;
    }
public function getComments()
    {
        //setup the comments
        $comment_ids = $this->getIds('comment');

        $comments = array();

        //only shows comments if there are comment_ids in the story
        //body or if the story has directly been commented on
        if (!empty($comment_ids)) {
            sort($comment_ids);
            $size = 0;
            foreach ($comment_ids as $id) {
                if (isset($this->_loaded_nodes[$id])) {
                    $comment = $this->_loaded_nodes[$id];
                    if ($comment instanceof ComBaseDomainEntityComment) {
                        $comments[$id] = $comment;
                        ++$size;
                    }
                }
                if ($size == 10) {
                    break;
                }
            }
        }

        return $comments;
    }
public function getComments ( ) { //setup the comments $ comment_ids = $ this -> getIds ( 'comment' ) ; $ comments = array ( ) ; //only shows comments if there are comment_ids in the story //body or if the story has directly been commented on if ( ! empty ( $ comment_ids ) ) { sort ( $ comment_ids ) ; $ size = 0 ; foreach ( $ comment_ids as $ id ) { if ( isset ( $ this -> _loaded_nodes [ $ id ] ) ) { $ comment = $ this -> _loaded_nodes [ $ id ] ; if ( $ comment instanceof ComBaseDomainEntityComment ) { $ comments [ $ id ] = $ comment ; ++ $ size ; } } if ( $ size == 10 ) { break ; } } } return $ comments ; }
Return an array of aggregated comments of the object.

@return array
Return an array of aggregated comments of the object .