Piwik\Plugins\Goals\Goals::getAllReportsWithGoalMetrics PHP 메소드

getAllReportsWithGoalMetrics() 개인적인 정적인 메소드

private static getAllReportsWithGoalMetrics ( )
    private static function getAllReportsWithGoalMetrics()
    {
        $reportsWithGoals = array();
        $reports = new ReportsProvider();
        foreach ($reports->getAllReports() as $report) {
            if ($report->hasGoalMetrics()) {
                $reportsWithGoals[] = array('category' => $report->getCategoryId(), 'name' => $report->getName(), 'module' => $report->getModule(), 'action' => $report->getAction(), 'parameters' => $report->getParameters());
            }
        }
        $reportsWithGoals[] = array('category' => 'General_Visit', 'name' => Piwik::translate('Goals_VisitsUntilConv'), 'module' => 'Goals', 'action' => 'getVisitsUntilConversion', 'viewDataTable' => 'table');
        $reportsWithGoals[] = array('category' => 'General_Visit', 'name' => Piwik::translate('Goals_DaysToConv'), 'module' => 'Goals', 'action' => 'getDaysToConversion', 'viewDataTable' => 'table');
        /**
         * Triggered when gathering all reports that contain Goal metrics. The list of reports
         * will be displayed on the left column of the bottom of every _Goals_ page.
         *
         * If plugins define reports that contain goal metrics (such as **conversions** or **revenue**),
         * they can use this event to make sure their reports can be viewed on Goals pages.
         *
         * **Example**
         *
         *     public function getReportsWithGoalMetrics(&$reports)
         *     {
         *         $reports[] = array(
         *             'category' => Piwik::translate('MyPlugin_myReportCategory'),
         *             'name' => Piwik::translate('MyPlugin_myReportDimension'),
         *             'module' => 'MyPlugin',
         *             'action' => 'getMyReport'
         *         );
         *     }
         *
         * @param array &$reportsWithGoals The list of arrays describing reports that have Goal metrics.
         *                                 Each element of this array must be an array with the following
         *                                 properties:
         *
         *                                 - **category**: The report category. This should be a translated string.
         *                                 - **name**: The report's translated name.
         *                                 - **module**: The plugin the report is in, eg, `'UserCountry'`.
         *                                 - **action**: The API method of the report, eg, `'getCountry'`.
         * @ignore
         * @deprecated since 2.5.0
         */
        Piwik::postEvent('Goals.getReportsWithGoalMetrics', array(&$reportsWithGoals));
        return $reportsWithGoals;
    }