public function getComments($newestFirst=true, $limit=null, $offset=null)
	{
		$query = Comment::find()->subject($this->owner);

		$query->orderNewestFirst($newestFirst);
		if ($limit !== null) $query->limit($limit);
		if ($offset !== null) $query->offset($offset);

		return $query->all();
    }
public function getComments($newestFirst=true, $limit=null, $offset=null)
	{
		$query = Comment::find()->subject($this->owner);

		$query->orderNewestFirst($newestFirst);
		if ($limit !== null) $query->limit($limit);
		if ($offset !== null) $query->offset($offset);

		return $query->all();
    }
public function getComments ( $ newestFirst = true , $ limit = null , $ offset = null ) { $ query = Comment :: find ( ) -> subject ( $ this -> owner ) ; $ query -> orderNewestFirst ( $ newestFirst ) ; if ( $ limit !== null ) $ query -> limit ( $ limit ) ; if ( $ offset !== null ) $ query -> offset ( $ offset ) ; return $ query -> all ( ) ; }
Fetches comments related to the owner of this behavior

@param bool $newestFirst if true, the newest records will be first (default: true)
@param integer $limit the max number of comments to return (default: all)
@param integer $offset the offset to start from (default: no offset)
@return \asinfotrack\yii2\comments\models\Comment[] the comments
Fetches comments related to the owner of this behavior