本文整理匯總了PHP中PageGenerator::display方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageGenerator::display方法的具體用法?PHP PageGenerator::display怎麽用?PHP PageGenerator::display使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PageGenerator
的用法示例。
在下文中一共展示了PageGenerator::display方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __my_header
function __my_header($label, $sidemenu, $item, $group)
{
$p = new PageGenerator($label);
if (!empty($item)) {
$sidemenu->forceActiveItem($item->action);
} else {
if ($group->type == 0) {
/* Highlight the "All groups" menu item on the left if the group is
not displayed on the menu bar */
$sidemenu->forceActiveItem('list');
} else {
$sidemenu->forceActiveItem('list_profiles');
}
}
$p->setSideMenu($sidemenu);
$p->display();
return $p;
}
示例2: NotifyWidgetFailure
exit;
} else {
new NotifyWidgetFailure(_T("Failed to add the rule."));
}
}
} else {
new NotifyWidgetFailure(_T("Service must be specified."));
}
}
if (isset($_POST['brestart'])) {
redirectTo(urlStrRedirect("shorewall/shorewall/restart_service", array("page" => $page)));
}
// Display policy form
$p = new PageGenerator(_T("Policy", "shorewall"));
$p->setSideMenu($sidemenu);
$p->display();
echo '<p>' . _T("The policy applies if no rule match the request.") . '</p>';
$f = new ValidatingForm(array('id' => 'policy'));
$f->push(new Table());
foreach (getPolicies() as $policy) {
if (startsWith($policy[0], $src) && startsWith($policy[1], $dst)) {
$label = sprintf("%s (%s) → %s (%s)", getZoneType($policy[0]), $policy[0], getZoneType($policy[1]), $policy[1]);
$decisionTpl = new SelectItem($policy[0] . "_" . $policy[1] . "_policy");
$decisionTpl->setElements(array(_T("Accept"), _T("Drop")));
$decisionTpl->setElementsVal(array("ACCEPT", "DROP"));
$decisionTpl->setSelected($policy[2]);
$f->add(new TrFormElement($label, $decisionTpl));
}
}
$f->pop();
$f->addButton("bpolicy", _T("Save"));
示例3: _shareIsEnabled
$shareDescription = "(" . _T("Hidden", "samba4") . ") ";
}
$shareDescription = isset($share[$shareComponent["description"]]) ? $shareDescription . $share[$shareComponent["description"]] : "";
$sharesDescription[] = $shareDescription;
$sharesGuestAccess[] = isset($share[$shareComponent["guest_access"]]) ? $share[$shareComponent["guest_access"]] : "";
if (isset($protectedShares) and !in_array($share[$shareComponent["name"]], $protectedShares)) {
$editActions[] = new ActionItem(_T("Edit", "samba4"), "edit", "edit", "share");
$delActions[] = new ActionPopupItem(_T("Delete", "samba4"), "delete", "delete", "share");
} else {
$editActions[] = new EmptyActionItem();
$delActions[] = new EmptyActionItem();
}
}
$page = new PageGenerator(_T("Current list of shares", "samba4"));
$page->setSideMenu($sidemenu);
$page->display();
$list = new ListInfos($sharesName, _T("Share", "samba4"));
$list->setCssClass("shareName");
$list->setCssClasses($sharesEnabled);
$list->addExtraInfo($sharesPath, _T("Path", "samba4"));
$list->addExtraInfo($sharesDescription, _T("Description", "samba4"));
$list->addActionItemArray($editActions);
$list->addActionItemArray($delActions);
$list->addActionItem(new ActionPopupItem(_T("Archive", "samba4"), "backup", "backup", "share"));
$list->disableFirstColumnActionLink();
$list->display();
/* Private functions */
function _shareIsEnabled($share)
{
return isset($share[2]) and $share[2];
}
示例4: display
function display()
{
parent::display();
$this->buildForm();
$this->form->display();
}