common/models/resources/ModelComment.php
public static function queryByBaseId( $baseId, $config = [] ) {

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

		return self::find()->where( [ 'baseId' => $baseId, 'type' => $type, 'status' => $status ] );
	}
public static function queryByBaseId( $baseId, $config = [] ) {

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

		return self::find()->where( [ 'baseId' => $baseId, 'type' => $type, 'status' => $status ] );
	}
public static function queryByBaseId ( $ baseId , $ config = [ ] ) { $ type = isset ( $ config [ 'type' ] ) ? $ config [ 'type' ] : self :: TYPE_COMMENT ; $ status = isset ( $ config [ 'status' ] ) ? $ config [ 'status' ] : self :: STATUS_APPROVED ; return self :: find ( ) -> where ( [ 'baseId' => $ baseId , 'type' => $ type , 'status' => $ status ] ) ; }
Return query to find the child comments.

@param integer $baseId
@param array $config
@return \yii\db\ActiveQuery to query child comments.
Return query to find the child comments .