/** */ public function display(array $params, $view = null) { // request params settings $params = array_merge(array('merge_css' => isset($_GET['merge_css']) ? (bool) $_GET['merge_css'] : false, 'minify_css' => isset($_GET['minify_css']) ? (bool) $_GET['minify_css'] : false, 'merge_js' => isset($_GET['merge_js']) ? (bool) $_GET['merge_js'] : false, 'minify_js' => isset($_GET['minify_js']) ? (bool) $_GET['minify_js'] : false), $params); if (!isset($params['content']) && isset($params['output'])) { $params['content'] = $params['output']; } $title = 'Test of the Template Engine'; if (isset($params['title'])) { $title = $params['title']; } $this->template_engine->templateFallback('getTemplateObject', array('TitleTag'))->add($title); $title_block = array('title' => isset($params['title']) ? $params['title'] : $title, 'subheader' => isset($params['subheader']) ? $params['subheader'] : "A PHP package to build HTML5 views (based on HTML5 Boilerplate layouts).", 'slogan' => isset($params['slogan']) ? $params['slogan'] : "<p>These pages show and demonstrate the use and functionality of the <a href=\"http://github.com/atelierspierrot/templatengine\">atelierspierrot/templatengine</a> PHP package you just downloaded.</p>"); $params['title'] = $title_block; if (empty($params['menu'])) { $params['menu'] = array('Home' => UrlHelper::url(array('page' => 'index')), 'Simple test' => UrlHelper::url(array('page' => 'hello')), 'Functions doc' => UrlHelper::url(array('page' => 'fcts')), 'Plugins test' => UrlHelper::url(array('page' => 'test')), 'Typographic tests' => UrlHelper::url(array('page' => 'loremipsum')), 'PHP Assets manager' => UrlHelper::url(array('page' => 'assets'))); } $params['footer'] = array('right' => 'A test of footer'); //var_export($params); exit('yo'); // this will display the layout on screen and exit $this->template_engine->renderLayout($view, $params, true, true); }
/** */ public function display(array $params, $view = null) { // request params settings $params = array_merge(array('merge_css' => isset($_GET['merge_css']) ? (bool) $_GET['merge_css'] : false, 'minify_css' => isset($_GET['minify_css']) ? (bool) $_GET['minify_css'] : false, 'merge_js' => isset($_GET['merge_js']) ? (bool) $_GET['merge_js'] : false, 'minify_js' => isset($_GET['minify_js']) ? (bool) $_GET['minify_js'] : false), $params); if (!isset($params['content']) && isset($params['output'])) { $params['content'] = $params['output']; } $title = 'Test of the Template Engine'; if (isset($params['title'])) { $title = $params['title']; } $this->template_engine->templateFallback('getTemplateObject', array('TitleTag'))->add($title); $title_block = array('title' => isset($params['title']) ? $params['title'] : $title, 'subheader' => isset($params['subheader']) ? $params['subheader'] : "The Bootstrap & Font-Awesome libraries ready to use with the atelierspierrot/assets-manager", 'slogan' => isset($params['slogan']) ? $params['slogan'] : "<p>These pages show and demonstrate the use and functionality of the <a href=\"http://github.com/atelierspierrot/assets-bootstrapper\">atelierspierrot/assets-bootstrapper</a> PHP package you just downloaded.</p>"); $params['title'] = $title_block; if (empty($params['menu'])) { $params['menu'] = array('Home' => UrlHelper::url(array('page' => 'index')), 'Theme' => UrlHelper::url(array('page' => 'theme')), 'Typographic tests' => UrlHelper::url(array('page' => 'loremipsum')), 'Off canvas' => UrlHelper::url(array('page' => 'offcanvas'))); } $params['footer'] = array('right' => 'A test of footer'); //var_export($params); exit('yo'); // this will display the layout on screen and exit $this->template_engine->renderLayout($view, $params, true, true); }
/** * URL manager * * @param string/array/null $param A parameter to set, or an array like `param => value` to set in URL * @param string/null $value The value of the `$param` argument (if it is a string) * @param string/null $url The URL to work on (`self::getRequestUrl()` by default) * @param bool $return Return/Echo flag (default is to echo result) * @return mixed The result of the `_echo` function (string or bool) * @see Library\Helper\Url::url() * @see _echo() */ function _url($param = null, $value = null, $url = null, $return = false) { return _echo(Helper\Url::url($param, $value, $url), $return); }