public function __construct() { parent::__construct(); // set tracking cookie FrontendModel::getVisitorId(); // add reference Spoon::set('page', $this); // get pageId for requested URL $this->pageId = FrontendNavigation::getPageId(implode('/', $this->URL->getPages())); // set headers if this is a 404 page if ($this->pageId == 404) { $this->statusCode = 404; } // create breadcrumb instance $this->breadcrumb = new FrontendBreadcrumb(); // create header instance $this->header = new FrontendHeader(); // new footer instance $this->footer = new FrontendFooter(); // get pagecontent $this->getPageContent(); // process page $this->processPage(); // execute all extras linked to the page $this->processExtras(); // store statistics $this->storeStatistics(); // display $this->display(); // trigger event FrontendModel::triggerEvent('core', 'after_page_processed', array('id' => $this->getId(), 'record' => $this->getRecord(), 'statusCode' => $this->getStatusCode(), 'sessionId' => SpoonSession::getSessionId(), 'visitorId' => FrontendModel::getVisitorId(), 'SESSION' => $_SESSION, 'COOKIE' => $_COOKIE, 'GET' => $_GET, 'POST' => $_POST, 'SERVER' => $_SERVER)); }
public function __construct() { parent::__construct(); // set template path self::setTemplatePath(FRONTEND_PATH . '/core/layout/templates/navigation.tpl'); // set selected ids $this->setSelectedPageIds(); }
/** * Default constructor * * @return void */ public function __construct() { // call parent parent::__construct(); // add into the reference Spoon::set('breadcrumb', $this); // get more information for the homepage $homeInfo = FrontendNavigation::getPageInfo(1); // add homepage as first item (with correct element) $this->addElement($homeInfo['navigation_title'], FrontendNavigation::getURL(1)); // get other pages $pages = $this->URL->getPages(); // init vars $items = array(); $errorURL = FrontendNavigation::getUrl(404); // loop pages while (!empty($pages)) { // init vars $URL = implode('/', $pages); $menuId = FrontendNavigation::getPageId($URL); $pageInfo = FrontendNavigation::getPageInfo($menuId); // do we know something about the page if ($pageInfo !== false && isset($pageInfo['navigation_title'])) { // only add pages that aren't direct actions if ($pageInfo['tree_type'] != 'direct_action') { // get URL $pageURL = FrontendNavigation::getUrl($menuId); // if this is the error-page, so we won't show an URL. if ($pageURL == $errorURL) { $pageURL = null; } // add to the items $items[] = array('title' => $pageInfo['navigation_title'], 'url' => $pageURL); } } // remove element array_pop($pages); } // reverse so everything is in place krsort($items); // loop and add elements foreach ($items as $row) { $this->addElement($row['title'], $row['url']); } }
/** * Default constructor * * @return void */ public function __construct() { // call the parent parent::__construct(); // store in reference Spoon::set('header', $this); // add some default CSS files $this->addCSS('/frontend/core/layout/css/jquery_ui/jquery_ui.css'); $this->addCSS('/frontend/core/layout/css/screen.css'); // debug stylesheet if (SPOON_DEBUG) { $this->addCSS('/frontend/core/layout/css/debug.css'); } // add default javascript-files $this->addJS('/frontend/core/js/jquery/jquery.js', false); $this->addJS('/frontend/core/js/jquery/jquery.ui.js', false); $this->addJS('/frontend/core/js/utils.js', true); $this->addJS('/frontend/core/js/frontend.js', false, true); }
/** * Default constructor * * @return void */ public function __construct() { // call parent parent::__construct(); // get pageId for requested URL $this->pageId = FrontendNavigation::getPageId(implode('/', $this->URL->getPages())); // make the pageId accessible through a static method self::$currentPageId = $this->pageId; // set headers if this is a 404 page if ($this->pageId == 404) { $this->statusCode = 404; } // create header instance $this->header = new FrontendHeader(); // get pagecontent $this->getPageContent(); // process page $this->processPage(); // store statistics $this->storeStatistics(); // display $this->display(); }
/** * Default constructor * * @return void * @param string $module The module to load. * @param string $action The action to load. * @param mixed[optional] $data The data that was passed from the database. */ public function __construct($module, $action, $data = null) { // call the parent parent::__construct(); // set properties $this->setModule($module); $this->setAction($action); if ($data !== null) { $this->setData($data); } // load the configfile for the required module $this->loadConfig(); }
public function __construct() { parent::__construct(); // store in reference Spoon::set('footer', $this); }
public function __construct() { parent::__construct(); // set selected ids $this->setSelectedPageIds(); }