public function _initView() { $title = "Clínica de Dermatologia - Dr. Andre Marinho"; $view = new Zend_View(); $view->headTitle($title); $view->headTitle()->setSeparator(" :: "); }
public function preDispatch() { $bootstrap = $this->getActionController()->getInvokeArg('bootstrap'); $config = $bootstrap->getOptions(); $module = $this->getRequest()->getModuleName(); if (isset($config[$module]['resources']['layout']['layout'])) { $layoutScript = $config[$module]['resources']['layout']['layout']; $this->getActionController()->getHelper('layout')->setLayout($layoutScript); } if (isset($config[$module]['site'])) { $headtitle = $config[$module]['site']['headtitle']; $keywords = $config[$module]['site']['keywords']; $description = $config[$module]['site']['description']; $layout = $module . '.css'; $favicon = $module . '/favicon.ico'; } else { $headtitle = $config['site']['headtitle']; $keywords = $config['site']['keywords']; $description = $config['site']['description']; $layout = 'default.css'; $favicon = 'favicon.ico'; } $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle($headtitle); $view->headTitle()->setSeparator(' | '); $view->headLink()->prependStylesheet('/css/' . $layout)->headLink(array('rel' => 'favicon', 'href' => '/images/' . $favicon), 'PREPEND')->prependStylesheet('/css/reset.css')->appendStylesheet('/css/menu.css'); $view->env = APPLICATION_ENV; $view->headMeta()->appendName('keyword', $keywords)->appendName('description', $description)->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US'); }
/** * @covers Robo47_Controller_Plugin_Title::postDispatch */ public function testPostDispatch() { $request = new Zend_Controller_Request_Http('http://www.domain.tld'); $view = new Zend_View(); $append = 'foo'; $prepend = 'baa'; $plugin = new Robo47_Controller_Plugin_Title($view, $append, $prepend); $view->headTitle('blub'); $plugin->postDispatch($request); $this->assertEquals('<title>baablubfoo</title>', (string) $view->headTitle()); }
/** Load the form options based on the broadperiod provided * @access public * @param string $broadperiod * @return \GreekAndRomanCoinForm * @throws Exception */ public function loadForm($broadperiod) { switch ($broadperiod) { case 'ROMAN': $form = new RomanCoinForm(); $form->details->setLegend('Add Roman numismatic data'); $form->submit->setLabel('Add Roman data'); $this->_view->headTitle('Add a Roman coin\'s details'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/JQuery/coinslinkedinit.js', $type = 'text/javascript'); break; case 'IRON AGE': $form = new IronAgeCoinForm(); $form->details->setLegend('Add Iron Age numismatic data'); $form->submit->setLabel('Add Iron Age data'); $this->_view->headTitle('Add an Iron Age coin\'s details'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/JQuery/iacoinslinkedinit.js', $type = 'text/javascript'); break; case 'EARLY MEDIEVAL': $form = new EarlyMedievalCoinForm(); $form->details->setLegend('Add Early Medieval numismatic data'); $form->submit->setLabel('Add Early Medieval data'); $this->_view->headTitle('Add an Early Medieval coin\'s details'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/JQuery/coinslinkedinitearlymededit.js', $type = 'text/javascript'); break; case 'MEDIEVAL': $form = new MedievalCoinForm(); $form->details->setLegend('Add Medieval numismatic data'); $form->submit->setLabel('Add Medieval data'); $this->_view->headTitle('Add a Medieval coin\'s details'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/JQuery/coinslinkedinitmededit.js', $type = 'text/javascript'); break; case 'POST MEDIEVAL': $form = new PostMedievalCoinForm(); $form->details->setLegend('Add Post Medieval numismatic data'); $form->submit->setLabel('Add Post Medieval data'); $this->_view->headTitle('Add a Post Medieval coin\'s details'); $this->_view->jQuery()->addJavascriptFile($this->_view->baseUrl() . '/js/JQuery/coinslinkedinitpostmededit.js', $type = 'text/javascript'); break; case 'BYZANTINE': $form = new ByzantineCoinForm(); $form->details->setLegend('Add Byzantine numismatic data'); $form->submit->setLabel('Add Byzantine data'); break; case 'GREEK AND ROMAN PROVINCIAL': $form = new GreekAndRomanCoinForm(); $form->details->setLegend('Add Greek & Roman numismatic data'); $form->submit->setLabel('Add Greek & Roman data'); break; default: throw new Exception('You cannot have a coin for that period.'); } return $form; }
protected function _initView() { $this->bootstrap(array('request')); // Initialize view $view = new Zend_View(); $view->setEncoding('UTF-8'); $view->doctype('XHTML1_STRICT'); $view->headTitle()->setSeparator(' » '); // Save the base URL $view->baseUrl = $this->getResource('request')->getBaseUrl(); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // Add some stylesheet $view->headLink()->appendStylesheet($view->baseUrl . '/css/default.css'); // Set user info /* $session = $this->getResource('session'); $view->userLoggedIn = $session->logged_in; $view->userInfo = $session->user; */ $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'SimpleCal_View_Helper_'); Zend_Dojo::enableView($view); // Return it, so that it can be stored by the bootstrap return $view; }
protected function _initView() { $options = $this->getOption('resources'); if (isset($options['view'])) { $view = new Zend_View($options['view']); } else { $view = new Zend_View(); } if (isset($options['view']['doctype'])) { $view->doctype($options['view']['doctype']); } if (isset($options['view']['contentType'])) { $view->headMeta()->appendHttpEquiv('Content-Type', $options['view']['contentType']); } /** * Default Title */ $view->headTitle('IPMCore')->setSeparator(' - '); $rev = $options['view']['version']; /** * JavaScript. Also see Layout.phtml in app/layouts */ $view->headScript()->appendFile('/js/jslibs.js', 'text/javascript')->appendFile('/js/ipmc/ipmcore.scripts_' . $rev . '.js', 'text/javascript'); /** * CSS. Also see Layout.phtml in app/layouts */ $view->headLink()->appendStylesheet('/css/print_' . $rev . '.css', 'print')->appendStylesheet('/css/screen_' . $rev . '.css', 'screen, projection')->appendStylesheet('/css/ie_' . $rev . '.css', 'screen, projection', 'IE')->appendStylesheet('/css/ipmcore_' . $rev . '.css'); if (APPLICATION_ENV != 'production') { Zend_Registry::set('version', $options['view']['version']); } $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); return $view; }
/** * Init view */ protected function _initView() { $theme = 'default-ui'; if (isset($_COOKIE["theme"])) { $theme = $_COOKIE["theme"]; } elseif (isset($this->config->app->theme)) { $theme = $this->config->app->theme; } define('THEME', $theme); // Initialize view $_options = $this->getOptions(); $view = new Zend_View(); $view->doctype('HTML5'); $view->headMeta() ->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ->appendHttpEquiv('X-UA-Compatible', 'IE=Edge'); $view->headTitle($_options['app']['name'])->setSeparator(' - '); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper( 'ViewRenderer' ); $viewRenderer->setView($view); // Return it, so that it can be stored by the bootstrap return $view; }
public function _initView() { // Initialize view $view = new Zend_View(); // Setup Helper Paths $view->setHelperPath(SM_LIB . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR . 'Helper', 'Smallunch_lib_View_Helper'); // Add Global Helper path (typically application/helpers $view->addHelperPath(GLOBAL_HELPER_DIR . DIRECTORY_SEPARATOR . 'View'); // add per application helper path (typically application/(backend, frontend)/helpers $view->addHelperPath(APPLICATION_DIRECTORY . DIRECTORY_SEPARATOR . 'Helper' . DIRECTORY_SEPARATOR . 'View'); // Setup layout if (isset($this->config->layout->doctype)) { $view->doctype($this->config->layout->doctype); } if (isset($this->config->default->title)) { $view->headTitle($this->config->default->title); } if (isset($this->config->default->meta_keywords)) { $view->headMeta($this->config->default->meta_keywords, 'keywords'); } if (isset($this->config->default->meta_description)) { $view->headMeta($this->config->default->meta_description, 'description'); } if (isset($this->config->layout->charset)) { $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=' . $this->config->layout->charset); } if (isset($this->config->layout->content_language)) { $view->headMeta()->appendHttpEquiv('Content-Language', $this->config->layout->content_language); } // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // Return it, so that it can be stored by the bootstrap return $view; }
public function getView() { if (null === $this->_view) { $options = $this->getOptions(); $title = ''; $doctype = ''; $contentType = 'text/html; charset=iso-8859-1'; if (array_key_exists('title', $options)) { $title = $options['title']; unset($options['title']); } if (isset($options['doctype'])) { $doctype = $options['doctype']; unset($options['doctype']); } if (isset($options['content-type'])) { $contentType = $options['content-type']; unset($options['content-type']); } $view = new Zend_View($options); $view->doctype($doctype); $view->headTitle($title); $view->headMeta()->setHttpEquiv('content-type', $contentType); $view->setHelperPath(LIBRARY_PATH . DS . 'Webbers/View/Helper', 'Webbers_View_Helper'); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setViewSuffix('inc'); $viewRenderer->setView($view); $this->_view = $view; } return $this->_view; }
protected function _initView() { $view = new Zend_View(); $view->headTitle('test test'); $view->docType('XHTML1_STRICT'); Zend_Layout::startMvc(array('layoutPath' => APPLICATION_PATH . '/layouts')); }
protected function _initView() { $view = new Zend_View(); //实例化两个资源 $view->doctype('XHTML1_STRICT'); $view->headTitle('可幻教育'); return $view; }
/** * _responseHtml * * @return void */ private function _responseHtml() { $body = $this->_viewRenderer->getResponse()->getBody(); $respHeader = "{$this->_view->doctype()}\n <html>\n <head>\n {$this->_view->headMeta()}\n {$this->_view->headTitle()}\n {$this->_view->headStyle()}\n {$this->_view->headLink()}\n {$this->_view->headScript()}\n {$this->_view->dojo()}\n </head>"; $respBody = "<body>{$body}</body>"; $respFooter = "</html>"; $this->_viewRenderer->getResponse()->setBody($respHeader . $respBody . $respFooter); }
protected function _initView() { $view = new Zend_View(); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $view->headTitle('Practical Plants SSO')->setSeparator(' - '); $viewRenderer->setView($view); return $view; }
protected function _initView() { $view = new Zend_View(); $cfg = $this->getOptions(); $site = $cfg['site']; $view->doctype('HTML5'); // $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8'); $view->headTitle()->prepend($site['name']); $view->headTitle()->setSeparator(' - '); $view->headMeta()->appendName('description', $site['meta']['description']); $view->headMeta()->appendName('keywords', $site['meta']['keywords']); $view->headMeta()->appendName('author', $site['meta']['author']); $view->env = APPLICATION_ENV; $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $viewRenderer->init(); $viewRenderer->view->addHelperPath('My' . DS . 'View' . DS . 'Helper', 'My_View_Helper'); }
protected function _initView() { $view = new Zend_View(); $view->doctype('HTML5'); $view->headTitle()->setSeparator(' | '); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); $view->setHelperPath(APPLICATION_PATH . '/modules/admin/views/helpers/'); $view->addHelperPath(APPLICATION_PATH . '/modules/public/views/helpers/'); Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer')->setView($view); }
protected function _initView() { $view = new Zend_View(); $view->doctype('XHTML1_TRANSITIONAL'); $view->setEncoding('UTF-8'); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US'); $view->headTitle('Chargify Sample App')->setSeparator(' | '); $view->addHelperPath('Crucial/View/Helper/', 'Crucial_View_Helper'); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); }
protected function _initView() { $config = $this->getOptions(); $view = new Zend_View($config); // set title $view->headTitle()->setSeparator(' :: '); //$view->headTitle($config['appName']); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); return $view; }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle('ZF Secure Login'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // Return it, so that it can be stored by the bootstrap return $view; }
protected function _initView() { $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle('Truffes'); $view->headLink()->appendStylesheet('/css/main.css'); $view->addHelperPath(APPLICATION_PATH . '/helpers', 'View_Helper'); $view->addHelperPath(APPLICATION_PATH . '/modules/frontend/views/helpers', 'View_Helper'); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); return $view; }
protected function _initView() { $view = new Zend_View(); $view->doctype('XHTML1_TRANSITIONAL'); $view->headMeta()->appendHttpEquiv('Content-type', 'text/html;charset=utf-8'); $view->headTitle('· Intermodels · Un deseo...hecho realidad · Modelos · Gogós · Azafatas · Agencia · Barcelona ·')->setSeparator(' - '); $view->headScript()->prependFile('http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js'); $view->addHelperPath('Neo/View/Helper', 'Neo_View_Helper'); $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); return $view; }
protected function _initViewHelpers() { $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headMeta()->appendHttpEquiv('content-type', 'text/html:charset=utf-8')->appendName('description', 'ISKCON Congregation Database-Mumbai Chowpatty'); $view->headTitle('Radha Gopinath Mandir'); // Create new view object if not already instantiated //$view = new Zend_View(); Zend_Dojo::enableView($view); $view->dojo()->addStyleSheetModule('dijit.themes.tundra')->setDjConfigOption('usePlainJson', true)->disable(); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle()->setSeparator(' - ')->append('Fedit'); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // Return it, so that it can be stored by the bootstrap return $view; }
/** * @author slovacus * @return type */ public function getView() { $this->_view = parent::getView(); if (null === $this->_view) { $options = $this->getOptions(); $view = new Zend_View(); $view->headTitle($options['title']); $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); $this->_view = $view; } return $this->_view; }
protected function _initView() { $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle('My First Zend Framework Application'); // ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8'); // $view->headLink()->appendStylesheet( 'http://zquick.vpak.dv.rbc.ru/Auto/public/css/style.css' ); // save return $view; }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle('My First Zend Framework Application'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); $viewRenderer->setView($view); Zend_Dojo::enableView($view); // Return it, so that it can be stored by the bootstrap return $view; }
/** * set view */ protected function _setView() { if (null === self::$_view) { self::$_view = new Zend_View(); $title = "Shrimp Project"; self::$_view->setScriptPath(SP_APP_PATH . '/modules/default/views')->setEncoding('UTF-8')->strictVars(false)->addHelperPath('SP/View/Helper', 'SP_View_Helper_'); self::$_view->doctype('XHTML1_STRICT'); self::$_view->headTitle($title); self::$_view->headLink()->appendStylesheet('/theme/default/main.css'); self::$_view->headScript()->appendFile('/js/jquery-1.4.2.min.js'); self::$_view->headScript()->appendFile('/js/jquery.cookie.js'); self::$_view->headScript()->appendFile('/js/sorttable.js'); //self::$_view->htmlTable(); } }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML5'); $view->headTitle('404 Logger'); //$view->addHelperPath('views/helpers', 'Zend_View_Helper_Table'); //Initialize and/or retrieve a ViewRenderer object on demand via the helper broker $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer'); $viewRenderer->initView(); //add the global helper directory path //viewRenderer->view->addHelperPath('/var/www/quickstart/application/GlobalViewHelpers'); // Return it, so that it can be stored by the bootstrap return $view; }
protected function _initView() { $this->bootstrap('request'); // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headTitle()->setSeparator(' » '); // Save the base URL $view->baseUrl = $this->getResource('request')->getBaseUrl(); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); $view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'HumanHelp_View_Helper_'); // Return it, so that it can be stored by the bootstrap return $view; }
/** * Fungsi untuk inisialisasi view */ protected function _initView() { // Initialize view $view = new Zend_View(); $view->headTitle('Budpar 2010'); /* ZendX_JQuery::enableView($view); $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper'); */ $view->addHelperPath(APPLICATION_PATH . '/../library/Budpar/View/Helper/', 'Budpar_View_Helper'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // Return it, so that it can be stored by the bootstrap return $view; }
/** * Gets content panel for the Debugbar * * @return string */ public function getPanel() { if (!Z_Acl::getInstance()->isAllowed(Z_Auth::getInstance()->getUser()->getRole(), $this->_z_resourceId)) { return; } $view = new Zend_View(); $modelSeo = new Z_Model_Titles(); $currentItem = $modelSeo->fetchRow(array('uri=?' => $_SERVER['REQUEST_URI'])); if ($currentItem) { $adminUrl = '/admin/z_seo/edit/id/' . $currentItem->id; $adminLinkText = 'Изменить'; } else { $adminUrl = '/admin/z_seo/add/uri/' . base64_encode($_SERVER['REQUEST_URI']); $adminLinkText = 'Добавить'; } return '<h4>Текущие значения:</h4>' . '<strong>URI:</strong> ' . $_SERVER['REQUEST_URI'] . '<br />' . '<strong>Заголовок:</strong> ' . strip_tags($view->headTitle()) . '<br />' . '<strong>Мета:</strong> <br />' . nl2br($view->escape($view->headMeta())) . '<br />' . '<br /><a href="' . $adminUrl . '" target="_blank">' . $adminLinkText . '</a>'; }