public function renderReportMenu(Report $report) { Piwik::checkUserHasSomeViewAccess(); $this->checkSitePermission(); $report->checkIsEnabled(); $menuTitle = $report->getMenuTitle(); if (empty($menuTitle)) { throw new Exception('This report is not supposed to be displayed in the menu, please define a $menuTitle in your report.'); } $menuTitle = $this->translator->translate($menuTitle); $content = $this->renderReportWidget($report); return View::singleReport($menuTitle, $content); }
protected function indexEvent($controllerMethod) { $count = 1; $apiMethod = str_replace('index', 'get', $controllerMethod, $count); $events = new Events(); $title = $events->getReportTitleTranslation($apiMethod); if (method_exists($this, $apiMethod)) { $content = $this->{$apiMethod}(); } else { $content = $this->renderReport($apiMethod); } return View::singleReport($title, $content); }
public function renderReportMenu($reportModule = null, $reportAction = null) { Piwik::checkUserHasSomeViewAccess(); $this->checkSitePermission(); $report = Report::factory($reportModule, $reportAction); if (empty($report)) { throw new Exception(Piwik::translate('General_ExceptionReportNotFound')); } $report->checkIsEnabled(); $menuTitle = $report->getMenuTitle(); if (empty($menuTitle)) { throw new Exception('This report is not supposed to be displayed in the menu, please define a $menuTitle in your report.'); } $menuTitle = Piwik::translate($menuTitle); $content = $this->renderReportWidget($reportModule, $reportAction); return View::singleReport($menuTitle, $content); }
public function indexCampaigns() { return View::singleReport(Piwik::translate('Referrers_Campaigns'), $this->getCampaigns(true)); }
public function indexOutlinks() { return View::singleReport(Piwik::translate('General_Outlinks'), $this->getOutlinks(true)); }
protected function indexEvent($controllerMethod) { $count = 1; $apiMethod = str_replace('index', 'get', $controllerMethod, $count); $events = new Events(); $title = $events->getReportTitleTranslation($apiMethod); return View::singleReport($title, $this->{$apiMethod}()); }
public function menuGetContentPieces() { $report = new GetContentPieces(); return View::singleReport($report->getName(), $report->render()); }
public function menuGetContentPieces() { $report = Report::factory($this->pluginName, 'getContentPieces'); return View::singleReport($report->getName(), $report->render()); }
public function index() { return View::singleReport(Piwik::translate('CustomVariables_CustomVariables'), $this->getCustomVariables(true)); }