本文整理汇总了PHP中WebPage::inst方法的典型用法代码示例。如果您正苦于以下问题:PHP WebPage::inst方法的具体用法?PHP WebPage::inst怎么用?PHP WebPage::inst使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebPage
的用法示例。
在下文中一共展示了WebPage::inst方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: basePageHref
function basePageHref($basePageCode, $image)
{
$basePage = WebPage::inst($basePageCode);
$sprites = CssSpritesManager::getDirSprite(CssSpritesManager::DIR_HEADER, $image, true);
$href = $basePage->getHref($sprites . $basePage->getName());
echo PsHtml::html2('li', array('class' => WebPages::getCurPage()->isMyBasePage($basePage) ? 'current' : null), $href);
}
示例2: __construct
public function __construct($title, $showCover = true, $hrefOrPageCode = null, array $smartyParams = array(), $jsParams = null)
{
$this->title = $title;
$this->cover = !!$showCover;
$this->href = is_numeric($hrefOrPageCode) ? WebPage::inst($hrefOrPageCode)->getUrl() : $hrefOrPageCode;
$this->smartyParams = $smartyParams;
$this->jsParams = $jsParams;
}
示例3: doProcess
protected function doProcess(PageContext $ctxt, RequestArrayAdapter $requestParams, ArrayAdapter $buildParams)
{
$this->PPM = PopupPagesManager::inst();
//Проверим, что в случае открытия popup страницы все параметры переданы корректно
if (!$this->PPM->isValidPageRequested()) {
WebPage::inst(PAGE_POPUP)->redirectHere();
}
$this->popupPage = $this->PPM->getCurPage();
$this->popupPage->checkAccess();
$this->popupPage->doProcess($requestParams);
}
示例4: smarty_block_page_href
function smarty_block_page_href($params, $content, Smarty_Internal_Template &$smarty)
{
if (isEmpty($content)) {
return;
}
$code = value_Array('code', $params);
$code = $code ? $code : BASE_PAGE_INDEX;
$sub = value_Array('sub', $params);
$title = value_Array('title', $params);
$classes = value_Array('class', $params);
$blank = !isEmptyInArray('blank', $params);
$http = !isEmptyInArray('http', $params);
$urlParams = array();
foreach ($params as $key => $val) {
if (starts_with($key, 'p_')) {
$urlParams[substr($key, 2)] = $val;
}
}
$content = trim($content);
$content = $content == '.' ? null : $content;
return WebPage::inst($code)->getHref($content, $blank, $classes, $http, $urlParams, $sub, $title);
}
示例5: pageUrl
public function pageUrl($page, array $getParams = null)
{
$getParams = to_array($getParams);
$getParams[GET_PARAM_PAGE] = $this->getPage($page)->getPageIdent();
return WebPage::inst(PAGE_ADMIN)->getUrl(false, $getParams);
}
示例6: getClientBoxFilling
protected function getClientBoxFilling()
{
$page = WebPage::inst(PAGE_HELPUS);
return new ClientBoxFilling($page->getName(), true, $page->getUrl());
}
示例7: writeToUsHref
public function writeToUsHref($content = 'Напишите нам', $blank = false, $http = false, $classes = 'write_to_us')
{
return WebPage::inst(BASE_PAGE_FEEDBACK)->getHref($content, $blank, $classes, $http, null, 'feed');
}
示例8: getPostPage
public function getPostPage()
{
return WebPage::inst(PAGE_LESSON);
}
示例9: getPageUrl
/**
* Ссылки на popup-страницы
*/
public function getPageUrl($page, array $params = array())
{
$ident = $page instanceof BasePopupPage ? $page->getIdent() : $page;
$this->assertExistsEntity($ident);
$params[POPUP_WINDOW_PARAM] = $ident;
return WebPage::inst(PAGE_POPUP)->getUrl(false, $params);
}
示例10: getPostPage
public function getPostPage()
{
return WebPage::inst(PAGE_ISSUE);
}
示例11: toArray
/**
* Преобразует элемент навигации в структуру, пригодную для разбора в javascript.
* При этом преобразует как себя, так и дерево потомков.
*/
public function toArray()
{
if ($this->pageCode !== null && !WebPage::inst($this->pageCode)->hasAccess()) {
return null;
}
$data = $this->extraData;
$data['href'] = $this->href;
//$data['url'] = $this->url;
//$data['name'] = $this->name;
/* @var $child NavigationItem */
foreach ($this->childsList as $child) {
$item = $child->toArray();
if ($item) {
$data['chlist'][] = $item;
}
}
if (array_key_exists('chlist', $data)) {
$data['chname'] = $this->childsName;
}
return $data;
}
示例12: getPostPage
public function getPostPage()
{
return WebPage::inst(PAGE_POST);
}