当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Dojo::enableView方法代码示例

本文整理汇总了PHP中Zend_Dojo::enableView方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo::enableView方法的具体用法?PHP Zend_Dojo::enableView怎么用?PHP Zend_Dojo::enableView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Dojo的用法示例。


在下文中一共展示了Zend_Dojo::enableView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initView

 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;
 }
开发者ID:shevron,项目名称:zend-simplecal,代码行数:26,代码来源:Bootstrap.php

示例2: _initViewSettings

 /**
  * Setup the view
  */
 protected function _initViewSettings()
 {
     $this->bootstrap('view');
     $this->_view = $this->getResource('view');
     // add global helpers
     $this->_view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'Zend_View_Helper');
     Zend_Dojo::enableView($this->_view);
     //$this->_view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     // set encoding and doctype
     $this->_view->setEncoding('koi8-r');
     $this->_view->doctype('XHTML1_STRICT');
     $config = $this->getResource('config');
     $prefix = $config["urlprefix"];
     // set css links and a special import for the accessibility styles
     //        $this->_view->headStyle()->setStyle('@import "/css/access.css";');
     //        $this->_view->headLink()->appendStylesheet('/reg2/css/reset.css');
     $this->_view->headLink()->appendStylesheet($prefix . '/css/form.css');
     $this->_view->headLink()->appendStylesheet($prefix . '/css/reg2.css');
     // setting the site in the title
     $this->_view->headTitle('ιώβ-10');
     // setting a separator string for segments:
     $this->_view->headTitle()->setSeparator(' - ');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
     $viewRenderer->setView($this->_view);
     return $this->_view;
 }
开发者ID:smalyshev,项目名称:chgk-teams,代码行数:29,代码来源:Bootstrap.php

示例3: _initView

 protected function _initView()
 {
     $view = new Zend_View();
     Zend_Dojo::enableView($view);
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->setView($view);
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     return $view;
 }
开发者ID:randaalex,项目名称:hna-base,代码行数:9,代码来源:Bootstrap.php

示例4: setUp

 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     $this->view = new Zend_View();
     Zend_Dojo::enableView($this->view);
 }
开发者ID:stunti,项目名称:zf2,代码行数:15,代码来源:BuildLayerTest.php

示例5: init

 /**
  * I think this is needed for something. can't remember
  *
  */
 public function init()
 {
     Zend_Dojo::enableView($this->view);
     $this->view->url = Zend_Registry::get('config')->site->url;
     $this->view->action = $this->getRequest()->getActionName();
     header('Content-Type: text/html; charset=ISO-8859-1');
     $this->_db = Zend_Registry::get('db');
     Bvb_Grid_Deploy_Ofc::$url = Zend_Registry::get('config')->site->url;
 }
开发者ID:Aeryris,项目名称:grid,代码行数:13,代码来源:SiteController.php

示例6: render

 /**
  * @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
  */
 public function render()
 {
     Zend_Dojo::enableView($this->getView());
     $this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.Select');
     $this->setAttribute('dojoType', 'dijit.form.Select');
     if (!$this->hasAttribute('style')) {
         $this->setAttribute('style', 'width:120px !important;');
     }
     return $this->getView()->formSelect($this->getFieldName(), $this->getDefaultValue(), $this->getAttributes(), $this->getValues());
 }
开发者ID:Aeryris,项目名称:grid,代码行数:13,代码来源:Select.php

示例7: init

 public function init()
 {
     parent::init();
     $this->_flash = $this->_helper->getHelper('FlashMessenger');
     $this->_redirector = $this->_helper->getHelper('Redirector');
     $this->checkAuth();
     $this->_identity = Zend_Auth::getInstance()->getIdentity();
     Zend_Dojo::enableView($this->view);
     //TODO there's gotta be a better way to do this
     $this->_config = Zend_Registry::get('Config');
 }
开发者ID:ajbrown,项目名称:bitnotion,代码行数:11,代码来源:Action.php

示例8: getDojo

 /**
  * Retrieve Dojo View Helper
  *
  * @return Zend_Dojo_View_Dojo_Container
  */
 public function getDojo()
 {
     if (null === $this->_dojo) {
         $this->getBootstrap()->bootstrap('view');
         $view = $this->getBootstrap()->view;
         Zend_Dojo::enableView($view);
         $view->dojo()->setOptions($this->getOptions());
         $this->_dojo = $view->dojo();
     }
     return $this->_dojo;
 }
开发者ID:jpbender,项目名称:mage_virtual,代码行数:16,代码来源:Dojo.php

示例9: setUp

 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
     $view = new Zend_View();
     Zend_Dojo::enableView($view);
     $this->helper = new My_View_Helper_SimpleTextarea();
     $this->helper->setView($view);
 }
开发者ID:kadvani1,项目名称:pastebin,代码行数:18,代码来源:SimpleTextareaTest.php

示例10: _initViewHelpers

 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);
 }
开发者ID:swastikit,项目名称:devotees,代码行数:13,代码来源:Bootstrap.php

示例11: setUp

 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 public function setUp()
 {
     $registry = Zend_Registry::getInstance();
     if (isset($registry['Zend_Dojo_View_Helper_Dojo'])) {
         unset($registry['Zend_Dojo_View_Helper_Dojo']);
     }
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
     $this->view = new Zend_View();
     Zend_Dojo::enableView($this->view);
     $this->view->addHelperPath('My/View/Helper/', 'My_View_Helper');
     $this->element = new My_Form_Element_SimpleTextarea('foo');
     $this->element->setView($this->view);
 }
开发者ID:kadvani1,项目名称:pastebin,代码行数:19,代码来源:SimpleTextareaTest.php

示例12: render

 /**
  * @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
  */
 public function render()
 {
     $this->removeAttribute('id');
     $this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('to')), 'to');
     $this->setDefaultValue(preg_replace('/\\D/', '', $this->getDefaultValue('from')), 'from');
     $this->setAttribute('dojoType', 'dijit.form.NumberTextBox');
     Zend_Dojo::enableView($this->getView());
     $this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.NumberTextBox');
     if (!$this->hasAttribute('style')) {
         $this->setAttribute('style', 'width:50px !important;');
     }
     return '<span>' . $this->__('From:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[from]', $this->getDefaultValue('from'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_from'))) . "<br><span>" . $this->__('To:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[to]', $this->getDefaultValue('to'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_to')));
 }
开发者ID:ocpyosep78,项目名称:Booking,代码行数:16,代码来源:Number.php

示例13: setDojo

 /**
  * Set Dojo
  *
  * @return void
  */
 public function setDojo()
 {
     Zend_Dojo::enableView($this->_view);
     $options = array_change_key_case($this->getOptions(), CASE_LOWER);
     foreach ($options as $key => $value) {
         switch ($key) {
             case 'cdnbase':
                 $this->_view->dojo()->setCdnBase($value);
                 break;
             case 'cdndojopath':
                 $this->_view->dojo()->setCdnDojoPath($value);
                 break;
             case 'cdnversion':
                 $this->_view->dojo()->setCdnVersion($value);
                 break;
             case 'djconfig':
                 $this->_view->dojo()->setDjConfig($value);
                 break;
             case 'layers':
                 foreach ($value as $path) {
                     $this->_view->dojo()->addLayer($path);
                 }
                 break;
             case 'localpath':
                 $this->_view->dojo()->setLocalPath($value);
                 break;
             case 'modules':
                 foreach ($value as $module) {
                     $this->_view->dojo()->requireModule($module);
                 }
                 break;
             case 'stylesheets':
                 foreach ($value as $path) {
                     $this->_view->dojo()->addStylesheet($path);
                 }
                 break;
             case 'stylesheetmodules':
                 foreach ($value as $module) {
                     $this->_view->dojo()->addStylesheetModule($module);
                 }
                 break;
             default:
                 break;
         }
     }
     if (array_key_exists('enable', $options) && $options['enable']) {
         $this->_view->dojo()->enable();
     } else {
         $this->_view->dojo()->disable();
     }
 }
开发者ID:rockett,项目名称:parables,代码行数:56,代码来源:Dojo.php

示例14: _initView

 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;
 }
开发者ID:laiello,项目名称:myopensources,代码行数:14,代码来源:Bootstrap.php

示例15: render

 /**
  * @see library/Bvb/Grid/Filters/Render/Bvb_Grid_Filters_Render_RenderInterface::render()
  */
 public function render()
 {
     $this->removeAttribute('id');
     $this->setAttribute('dojoType', 'dijit.form.DateTextBox');
     $this->setAttribute('constraints', "{datePattern:'dd-MM-yyyy'}");
     if ($this->getDefaultValue('from')) {
         $this->setDefaultValue(date('Y-m-d', strtotime($this->getDefaultValue('from'))), 'from');
     }
     if ($this->getDefaultValue('to')) {
         $this->setDefaultValue(date('Y-m-d', strtotime($this->getDefaultValue('to'))), 'to');
     }
     Zend_Dojo::enableView($this->getView());
     $this->getView()->dojo()->enable()->setDjConfigOption('parseOnLoad', true)->requireModule('dijit.form.DateTextBox');
     if (!$this->hasAttribute('style')) {
         $this->setAttribute('style', 'width:80px !important;');
     }
     return '<span>' . $this->__('From:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[from]', $this->getDefaultValue('from'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_from'))) . "<br><span>" . $this->__('To:') . "</span>" . $this->getView()->formText($this->getFieldName() . '[to]', $this->getDefaultValue('to'), array_merge($this->getAttributes(), array('id' => 'filter_' . $this->getFieldName() . '_to')));
 }
开发者ID:ocpyosep78,项目名称:Booking,代码行数:21,代码来源:Date.php


注:本文中的Zend_Dojo::enableView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。