protected function _initView() { $options = $this->getOptions(); if (!isset($options['resources']['view'])) { return; } $config = $options['resources']['view']; if (isset($config)) { $view = new Zend_View($config); } else { $view = new Zend_View(); } $view->setUseStreamWrapper(true); if (isset($config['doctype'])) { $view->doctype($config['doctype']); } if (isset($config['language'])) { $view->headMeta()->appendName('language', $config['language']); } if (isset($config['charset'])) { $view->headMeta()->setCharset($config['charset'], 'charset'); } $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); 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; }
/** * Set <meta> elements * * @return void */ public function setHeadMetas() { foreach ($this->getOptions() as $headMeta => $options) { $content = array_key_exists('content', $options) && isset($options['content']) ? $options['content'] : null; $keyValue = array_key_exists('keyValue', $options) && isset($options['keyValue']) ? $options['keyValue'] : null; $keyType = array_key_exists('keyType', $options) && isset($options['keyType']) ? $options['keyType'] : null; $modifiers = array_key_exists('modifiers', $options) && isset($options['modifiers']) ? $options['modifiers'] : array(); $placement = array_key_exists('placement', $options) && isset($options['placement']) ? $options['placement'] : 'APPEND'; $this->_view->headMeta($content, $keyValue, $keyType, $modifiers, $placement); } }
function _initViewHelpers() { $view = new Zend_View(); $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); $view->headMeta()->appendHttpEquiv('X-UA-Compatible', "IE=edge,chrome=1"); $view->headMeta()->appendHttpEquiv('PRAGMA', "NO-CACHE"); $view->headMeta()->setCharset('UTF-8'); $view->headMeta()->appendName("viewport", "width=device-width,initial-scale=1.0"); $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); $viewRenderer->setView($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); }
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() { $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; }
/** * Setup head block * @return null */ protected function _setupHeadOptions() { // Défini le charset $this->_view->headMeta()->setHttpEquiv( 'Content-Type', 'text/html; charset=' . $this->_localOptions['encoding'] ); // Défini le doctype $this->_view->doctype($this->_localOptions['doctype']); }
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'); }
/** * _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(); $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); }
function _initView() { $view = new Zend_View(); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset = utf-8'); $view->headLink()->appendStylesheet(HOST_PROJECT . "/public/css/bootstrap.min.css"); $view->headLink()->offsetSetStylesheet("2", HOST_PROJECT . "/public/css/bootstrap-theme.css"); $view->headLink()->offsetSetStylesheet("3", HOST_PROJECT . "/public/css/style.css"); $view->headScript()->appendFile(HOST_PROJECT . "/public/js/jquery-1.11.3.min.js"); $view->headScript()->offsetSetFile("2", HOST_PROJECT . "/public/js/bootstrap.min.js"); $view->headScript()->offsetSetFile("3", HOST_PROJECT . "/public/js/myscript.js"); }
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() { $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() { $options = $this->getOptions(); $config = $options['resources']['view']; if (isset($config)) { $view = new Zend_View($config); } else { $view = new Zend_View(); } if (isset($config['doctype'])) { $view->doctype($config['doctype']); } if (isset($config['contentType'])) { $view->headMeta()->appendHttpEquiv('Content-Type', $config['contentType']); } if (isset($config['language'])) { $view->headMeta()->appendName('language', $config['language']); } $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()->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; }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->setEncoding('utf-8'); $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); Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers'); // Return it, so that it can be stored by the bootstrap return $view; }
/** * Nastavuje view * * @return Zend_View */ public function getView() { $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); //->appendHttpEquiv('X-UA-Compatible', 'IE=EmulateIE7'); $request = new Zend_Controller_Request_Http(); $view->addHelperPath(APP_PATH . "/helpers", "Unodor_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; }
protected function _initView() { $this->bootstrap('DB'); $view = new Zend_View(); $view->addHelperPath('Rabotal/View/Helper', 'Rabotal_View_Helper_'); $view->doctype('HTML5'); $view->headMeta()->setCharset('utf-8'); // Initialize common variables $view->user = $this->bootstrap('User')->getResource('User'); $view->role = $this->bootstrap('Role')->getResource('Role'); $view->acl = $this->bootstrap('Acl')->getResource('Acl'); $view->options = $this->getOption('site'); // Set view $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); 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>'; }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('XHTML1_STRICT'); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); $view->addHelperPath('App/View/Helper/', 'App_View_Helper'); $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper'); Zend_Dojo::enableView($view); Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); //seulement si on utilise d'autres frameworks ajax ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode(); // Return it, so that it can be stored by the bootstrap return $view; }
/** * Initialize the view resource. */ protected function _initView() { $view = new Zend_View(); $view->doctype('HTML5'); // add our view helper path $view->addHelperPath(realpath(APPLICATION_PATH . '/classes/Hmd/View/Helper'), 'Hmd_View_Helper'); // set up view title and separators $tx = $this->getResource("translate"); $title = $tx->translate("app-title"); $sep = $tx->translate("title-sep"); $view->headTitle($title)->setSeparator($sep); // setup content type meta tag $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8'); // configure view renderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); // add to controller action helper path Zend_Controller_Action_HelperBroker::addPrefix('Hmd_Controller_Action_Helper'); return $view; }
protected function _initView() { // initialize view $view = new Zend_View(); // doctype $view->doctype('XHTML1_STRICT'); // encoding $view->setEncoding('UTF-8'); // title $view->headTitle('Ofelia')->setSeparator(' | ')->setIndent(8); // meta tags $view->headMeta()->setHttpEquiv('Content-Type', 'text/html; charset=UTF-8')->appendHttpEquiv('Content-Language', 'en-US')->setName('keywords', 'Ofelia, Open-ended Front-end')->appendName('description', "PHPCabal's Open-ended Front-end")->appendName('google-site-verification', '')->setIndent(8); // stylesheets & feeds (headLinks) $view->headLink()->setStylesheet('/css/default.css', 'all')->appendStylesheet('/css/menu.css', 'all')->headLink(array('rel' => 'favicon', 'href' => '/images/favicon.ico'), 'PREPEND')->headLink(array('rel' => 'shortcut icon', 'href' => '/images/favicon.ico'), 'PREPEND')->appendAlternate('/feed/', 'application/rss+xml', 'Noticias Generales')->setIndent(8); // javascript $view->headScript()->appendFile('/js/default.js', 'text/javascript', array('charset' => 'utf-8'))->setIndent(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; }
protected function _initView() { // Création et paramétrage de la vue $view = new Zend_View(); $view->setEncoding('utf-8'); $view->headMeta()->setHttpEquiv('Content-type', 'text/html; charset=utf-8'); // Activation de jQuery $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper'); $jquery = $view->jQuery(); $jquery->enable(); // Si vous ne souhaitez pas utiliser google // on peut demander r ZendX _ JQuery de travailler // avec une bibliothcque locale //$rmode = ZendX _ JQuery::RENDER _ JQUERY _ ON _ LOAD // | ZendX _ JQuery::RENDER _ SOURCES; //$jquery->setRenderMode($rmode); //$jquery->addJavascriptFile('../scripts/jquery-1.3.2.min.js'); // Enregistrement de l’objet $view comme vue principale $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer(); $viewRenderer->setView($view); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); return $view; }
protected function _initView() { // Initialize view $view = new Zend_View(); $view->doctype('HTML5'); $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8'); //$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper'); $view->addHelperPath('ZendX/JQuery/View/Helper', 'ZendX_JQuery_View_Helper'); //jQuery $view->jQuery()->setLocalPath('/jtables/scripts/jquery-1.9.1.js')->setUiLocalPath('/jtables/scripts/jquery-ui-1.10.1.custom.js')->addStyleSheet('/jtables/css/jquery-ui-1.10.1.custom.css'); $view->headLink()->appendStylesheet('/jtables/scripts/jtable/themes/lightcolor/blue/jtable.css')->appendStylesheet('/jtables/css/bootstrap.css')->appendStylesheet('/jtables/css/bootstrap-theme.css'); //Script $view->headScript()->appendFile('/jtables/scripts/jquery-1.6.4.min.js')->appendFile('/jtables/scripts/jquery-ui-1.8.16.custom.min.js')->appendFile('/jtables/scripts/jtable/jquery.jtable.min.js')->appendFile('/jtables/scripts/jtable/localization/jquery.jtable.fr.js'); //->appendFile('/jtables/scripts/bootstrap.js'); //Zend_Dojo::enableView($view); Zend_Paginator::setDefaultScrollingStyle('Elastic'); Zend_View_Helper_PaginationControl::setDefaultViewPartial('partials/pagination.phtml'); // Add it to the ViewRenderer $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer'); $viewRenderer->setView($view); //seulement si on utilise d'autres frameworks ajax ZendX_JQuery_View_Helper_JQuery::enableNoConflictMode(); return $view; }
protected function _initView() { // initialize view $view = new Zend_View(); // get it's configuration file $site = new Zend_Config_Ini(APPLICATION_PATH . '/configs/site.ini', APPLICATION_ENV); // doctype $view->doctype($site->doctype); // encoding $view->setEncoding($site->encoding); // title $view->headTitle($site->name)->setSeparator(' | ')->setIndent(8); // meta tags $view->headMeta()->setName('keywords', $site->keywords)->appendName('description', $site->description)->appendName('google-site-verification', $site->googleVerification)->setIndent(8); // stylesheets & feeds (headLinks) $view->headLink()->setStylesheet('/css/layout.css', 'all')->appendStylesheet('/css/default.css', 'all')->appendStylesheet('/css/menu.css', 'all')->headLink(array('rel' => 'favicon', 'href' => '/images/favicon.ico'), 'PREPEND')->headLink(array('rel' => 'shortcut icon', 'href' => '/images/favicon.ico'), 'PREPEND')->appendAlternate('/feed/', 'application/rss+xml', 'News')->setIndent(8); // javascript $view->headScript()->appendFile('/js/default.js', 'text/javascript', array('charset' => $site->encoding))->setIndent(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; }
/** * @group ZF-7722 */ public function testCharset() { $view = new Zend_View(); $view->doctype('HTML5'); $view->headMeta()->setCharset('utf-8'); $this->assertEquals('<meta charset="utf-8">', $view->headMeta()->toString()); $view->doctype('XHTML5'); $this->assertEquals('<meta charset="utf-8"/>', $view->headMeta()->toString()); }
/** * @issue ZF-2663 */ public function testSetNameDoesntClobberPart2() { $view = new Zend_View(); $view->headMeta()->setName('keywords', 'foo'); $view->headMeta()->setName('description', 'foo'); $view->headMeta()->appendHttpEquiv('pragma', 'baz'); $view->headMeta()->appendHttpEquiv('Cache-control', 'baz'); $view->headMeta()->setName('keywords', 'bar'); $this->assertEquals('<meta name="description" content="foo" />' . PHP_EOL . '<meta http-equiv="pragma" content="baz" />' . PHP_EOL . '<meta http-equiv="Cache-control" content="baz" />' . PHP_EOL . '<meta name="keywords" content="bar" />', $view->headMeta()->toString()); }