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); }
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; }
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); }
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); }
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); }
protected function getClientBoxFilling() { $page = WebPage::inst(PAGE_HELPUS); return new ClientBoxFilling($page->getName(), true, $page->getUrl()); }
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'); }
public function getPostPage() { return WebPage::inst(PAGE_LESSON); }
/** * Ссылки на 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); }
public function getPostPage() { return WebPage::inst(PAGE_ISSUE); }
/** * Преобразует элемент навигации в структуру, пригодную для разбора в 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; }
public function getPostPage() { return WebPage::inst(PAGE_POST); }