Piwik\Plugins\ScheduledReports\ScheduledReports::throwExceptionReportsAreUsingSegment PHP Method

throwExceptionReportsAreUsingSegment() protected method

protected throwExceptionReportsAreUsingSegment ( $reportsUsingSegment )
$reportsUsingSegment
    protected function throwExceptionReportsAreUsingSegment($reportsUsingSegment)
    {
        $reportList = '';
        $reportNameJoinText = ' ' . Piwik::translate('General_And') . ' ';
        foreach ($reportsUsingSegment as $report) {
            $reportList .= '\'' . $report['description'] . '\'' . $reportNameJoinText;
        }
        $reportList = rtrim($reportList, $reportNameJoinText);
        $errorMessage = Piwik::translate('ScheduledReports_Segment_Deletion_Error', $reportList);
        throw new Exception($errorMessage);
    }