當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_View::dojo方法代碼示例

本文整理匯總了PHP中Zend_View::dojo方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_View::dojo方法的具體用法?PHP Zend_View::dojo怎麽用?PHP Zend_View::dojo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_View的用法示例。


在下文中一共展示了Zend_View::dojo方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _responseHtml

 /**
  * _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);
 }
開發者ID:BGCX261,項目名稱:zlayer-svn-to-git,代碼行數:13,代碼來源:Abstract.php

示例2: postDispatch

 /**
  * postDispatch
  *
  * @param  Zend_Controller_Request_Abstract $oRequest
  * @return void
  */
 public function postDispatch(Zend_Controller_Request_Abstract $oRequest)
 {
     // Vars
     $options = $this->_getOptions()->getMergedRequestOptions($oRequest);
     $front = Zend_Controller_Front::getInstance();
     // Dojo
     if (isset($options["dojo"])) {
         if (count($options["dojo"]) > 0) {
             $djOptions = $options["dojo"];
             if (isset($djOptions["djConfig"])) {
                 $array = array_merge($djOptions['djConfig'], $this->_view->dojo()->getDjConfig());
                 $this->_view->dojo()->setDjConfig($array);
                 unset($djOptions["djConfig"]);
             }
             $this->_view->dojo()->setOptions($djOptions);
         }
         Zend_Dojo::enableView($this->_view);
     }
 }
開發者ID:BGCX261,項目名稱:zlayer-svn-to-git,代碼行數:25,代碼來源:Dojo.php

示例3: testResetResponseShouldClearAllViewPlaceholders

 public function testResetResponseShouldClearAllViewPlaceholders()
 {
     $this->testCase->getFrontController()->setControllerDirectory(dirname(__FILE__) . '/_files/application/controllers');
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->initView();
     $view = $viewRenderer->view;
     $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
     $view->dojo()->setCdnVersion('1.1.0')->requireModule('dojo.parser')->enable();
     $view->headTitle('Foo');
     $this->testCase->dispatch('/zend-test-php-unit-foo/baz');
     $response = $this->testCase->getResponse();
     $this->testCase->resetResponse();
     $view = new Zend_View();
     $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
     $this->assertFalse($view->dojo()->isEnabled(), 'Dojo is enabled? ', $view->dojo());
     $this->assertNotContains('Foo', $view->headTitle()->__toString(), 'Head title persisted?');
 }
開發者ID:sasezaki,項目名稱:mirror-zf1-tests,代碼行數:17,代碼來源:ControllerTestCaseTest.php

示例4: prep_view

 /**
  *
  * @param Zend_View $pView
  * @return void
  */
 public static function prep_view(Zend_View $pView)
 {
     $pView->dojo()->addLayer(ZUPAL_BASEURL . DS . 'scripts/Dojo/dojo/grid_layer.js')->addStyleSheet(ZUPAL_BASEURL . DS . 'scripts/Dojo/dojox/grid/resources/Grid.css')->enable();
 }
開發者ID:BGCX262,項目名稱:zupal-svn-to-git,代碼行數:9,代碼來源:Maker.php

示例5: 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


注:本文中的Zend_View::dojo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。