common/models/resources/ModelComment.php
public static function queryByType( $parentId, $parentType, $type = ModelComment::TYPE_COMMENT, $config = [] ) {

		//$type	= isset( $config[ 'type' ] ) ? $config[ 'type' ] : self::TYPE_COMMENT;
		$status	= isset( $config[ 'status' ] ) ? $config[ 'status' ] : self::STATUS_APPROVED;

		return self::queryByParent( $parentId, $parentType, $config )->andWhere( [ 'type' => $type, 'status' => $status ] );
	}
public static function queryByType( $parentId, $parentType, $type = ModelComment::TYPE_COMMENT, $config = [] ) {

		//$type	= isset( $config[ 'type' ] ) ? $config[ 'type' ] : self::TYPE_COMMENT;
		$status	= isset( $config[ 'status' ] ) ? $config[ 'status' ] : self::STATUS_APPROVED;

		return self::queryByParent( $parentId, $parentType, $config )->andWhere( [ 'type' => $type, 'status' => $status ] );
	}
public static function queryByType ( $ parentId , $ parentType , $ type = ModelComment :: TYPE_COMMENT , $ config = [ ] ) { //$type	= isset( $config[ 'type' ] ) ? $config[ 'type' ] : self::TYPE_COMMENT; $ status = isset ( $ config [ 'status' ] ) ? $ config [ 'status' ] : self :: STATUS_APPROVED ; return self :: queryByParent ( $ parentId , $ parentType , $ config ) -> andWhere ( [ 'type' => $ type , 'status' => $ status ] ) ; }
Return query to find the comments by type.

@param integer $parentId
@param string $parentType
@param string $type
@param array $config
@return \yii\db\ActiveQuery to query by type.
Return query to find the comments by type .