public static function getForDimension(Dimension $dimension)
    {
        $provider = new ReportsProvider();
        $reports = $provider->getAllReports();
        foreach ($reports as $report) {
            if (!$report->isSubtableReport()
                && $report->getDimension()
                && $report->getDimension()->getId() == $dimension->getId()
            ) {
                return $report;
            }
        }
        return null;
    }
public static function getForDimension(Dimension $dimension)
    {
        $provider = new ReportsProvider();
        $reports = $provider->getAllReports();
        foreach ($reports as $report) {
            if (!$report->isSubtableReport()
                && $report->getDimension()
                && $report->getDimension()->getId() == $dimension->getId()
            ) {
                return $report;
            }
        }
        return null;
    }
public static function getForDimension ( Dimension $ dimension ) { $ provider = new ReportsProvider ( ) ; $ reports = $ provider -> getAllReports ( ) ; foreach ( $ reports as $ report ) { if ( ! $ report -> isSubtableReport ( ) && $ report -> getDimension ( ) && $ report -> getDimension ( ) -> getId ( ) == $ dimension -> getId ( ) ) { return $ report ; } } return null ; }
Finds a top level report that provides stats for a specific Dimension.

@param Dimension $dimension The dimension whose report we're looking for.
@return Report|null The
@api
Finds a top level report that provides stats for a specific Dimension .