本文整理汇总了PHP中Piwik\View::singleReport方法的典型用法代码示例。如果您正苦于以下问题:PHP View::singleReport方法的具体用法?PHP View::singleReport怎么用?PHP View::singleReport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\View
的用法示例。
在下文中一共展示了View::singleReport方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderReportMenu
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);
}
示例2: indexEvent
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);
}
示例3: renderReportMenu
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);
}
示例4: indexCampaigns
public function indexCampaigns()
{
return View::singleReport(Piwik::translate('Referrers_Campaigns'), $this->getCampaigns(true));
}
示例5: indexOutlinks
public function indexOutlinks()
{
return View::singleReport(Piwik::translate('General_Outlinks'), $this->getOutlinks(true));
}
示例6: indexEvent
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}());
}
示例7: menuGetContentPieces
public function menuGetContentPieces()
{
$report = new GetContentPieces();
return View::singleReport($report->getName(), $report->render());
}
示例8: menuGetContentPieces
public function menuGetContentPieces()
{
$report = Report::factory($this->pluginName, 'getContentPieces');
return View::singleReport($report->getName(), $report->render());
}
示例9: index
public function index()
{
return View::singleReport(Piwik::translate('CustomVariables_CustomVariables'), $this->getCustomVariables(true));
}