本文整理匯總了PHP中Fisharebest\Webtrees\Module::getActiveReports方法的典型用法代碼示例。如果您正苦於以下問題:PHP Module::getActiveReports方法的具體用法?PHP Module::getActiveReports怎麽用?PHP Module::getActiveReports使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Fisharebest\Webtrees\Module
的用法示例。
在下文中一共展示了Module::getActiveReports方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: menuReports
/**
* A menu with a list of reports.
*
* @return Menu|null
*/
protected function menuReports()
{
$submenus = array();
foreach (Module::getActiveReports($this->tree) as $report) {
$submenus[] = $report->getReportMenu();
}
if ($submenus) {
return new Menu(I18N::translate('Reports'), '#', 'menu-report', array('rel' => 'nofollow'), $submenus);
} else {
return null;
}
}
示例2: array
$action = 'setup';
}
break;
default:
break;
}
}
}
$vars = $newvars;
foreach ($varnames as $name) {
if (!isset($vars[$name])) {
$vars[$name]['id'] = '';
}
}
$reports = array();
foreach (Module::getActiveReports($WT_TREE) as $rep) {
$menu = $rep->getReportMenu();
if (preg_match('/report=(' . preg_quote(WT_MODULES_DIR, '/') . '[a-z0-9_]+\\/[a-z0-9_]+\\.xml)/', $menu->getLink(), $match)) {
$reports[$match[1]] = $menu->getLabel();
}
}
if (!empty($report)) {
if (!array_key_exists($report, $reports)) {
$action = 'choose';
}
}
//-- choose a report to run
switch ($action) {
case 'choose':
$controller->setPageTitle(I18N::translate('Choose a report to run'))->pageHeader();
echo '<div id="reportengine-page">