public function render() { View::addCoreLib(array('style.css', 'buttons.css', 'sprites.css')); // set relevant uri adapter and get some identifiers if (!ViewUri::getUriAdapter() instanceof ViewUri\Adapter\GetAdapter) { // set url base $tmp = explode('?', $_SERVER['REQUEST_URI']); $this->_uriAdapter = new ViewUri\Adapter\GetAdapter($tmp[0]); } else { $this->_uriAdapter = ViewUri::getUriAdapter(); } $this->_offsetIdentifier = $this->_uriAdapter->getIdentifier('offset'); $this->_sortIdentifier = $this->_uriAdapter->getIdentifier('sort'); $this->_searchIdentifier = $this->_uriAdapter->getIdentifier('search'); if (count($this->_uriAdapter->getEnv()) != 0) { $this->_uriAdapter->saveSearchTerms(); } else { // try and restore cached search terms for the current uri $this->_uriAdapter->restoreSearchTerms(); } // set data source for environment $this->_env = $this->_uriAdapter->getEnv(); $p = $this->_headerRendering(); $p .= $this->_contentRendering(); $status = $this->_obj->getParameter('open_default') ? 'open' : 'close'; $status .= $this->_obj->getParameter('locked') ? ' locked' : ''; $title = $this->_obj->getTitle() ? $this->_obj->getTitle() : 'Recherche'; $html_head = <<<HTML \t<div class="t41 component white medium" id="{$this->getId()}"> \t\t<h4 class="title slide_toggle {$status}"><div class="icon"></div>{$title}</h4> \t\t<div class="content"> HTML; // save search terms //$this->_uriAdapter->saveSearchTerms($searchTermsSessionKey); return $html_head . $p . '</form></div></div>'; }
public static function getIdentifier($identifier) { self::getUriAdapter(); return self::$_uriAdapter->getIdentifier($identifier); }