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


PHP Helper\Dojo類代碼示例

本文整理匯總了PHP中Zend\Dojo\View\Helper\Dojo的典型用法代碼示例。如果您正苦於以下問題:PHP Dojo類的具體用法?PHP Dojo怎麽用?PHP Dojo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     DojoHelper::setUseProgrammatic();
     $html = $this->getElement();
     $this->assertNotRegexp('/<button[^>]*(dojoType="dijit.form.Button")/', $html);
     $this->assertNotNull($this->view->plugin('dojo')->getDijit('elementId'));
 }
開發者ID:bradley-holt,項目名稱:zf2,代碼行數:7,代碼來源:ButtonTest.php

示例2: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     DojoHelper::setUseProgrammatic();
     $html = $this->getContainer();
     $this->assertNotRegexp('/<div[^>]*(dojoType="dijit.layout.AccordionContainer")/', $html);
     $this->assertNotNull($this->view->broker('dojo')->getDijit('container'));
 }
開發者ID:alab1001101,項目名稱:zf2,代碼行數:7,代碼來源:AccordionContainerTest.php

示例3: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     DojoHelper::setUseProgrammatic();
     $html = $this->getElement();
     $this->assertNotRegexp('/<input[^>]*(dojoType="dijit.form.DateTextBox")/', $html);
     $this->assertNotNull($this->view->broker('dojo')->getDijit('elementId'));
 }
開發者ID:alab1001101,項目名稱:zf2,代碼行數:7,代碼來源:DateTextBoxTest.php

示例4: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     DojoHelper::setUseProgrammatic();
     $html = $this->getElement();
     $this->assertNotRegexp('/<textarea[^>]*(dojoType="dijit.form.Textarea")/', $html);
     $this->assertNotNull($this->view->dojo()->getDijit('elementId'));
 }
開發者ID:rmarshall-quibids,項目名稱:zf2,代碼行數:7,代碼來源:TextareaTest.php

示例5: testOnlyIdShouldBeNecessary

 public function testOnlyIdShouldBeNecessary()
 {
     DojoHelper::setUseDeclarative();
     $html = $this->view->form('foo');
     $this->assertRegexp('/<form[^>]*(dojoType="dijit.form.Form")/', $html, $html);
     $this->assertRegexp('/<form[^>]*(id="foo")/', $html, $html);
 }
開發者ID:heiglandreas,項目名稱:zf2,代碼行數:7,代碼來源:FormTest.php

示例6: 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::_unsetInstance();
     DojoHelper::setUseDeclarative();
     $this->view = $this->getView();
     $this->element = $this->getElement();
     $this->element->setView($this->view);
 }
開發者ID:rafalwrzeszcz,項目名稱:zf2,代碼行數:14,代碼來源:CheckBoxTest.php

示例7: 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::_unsetInstance();
     DojoHelper::setUseDeclarative();
     $this->view = $this->getView();
     $this->helper = new EditorHelper();
     $this->helper->setView($this->view);
 }
開發者ID:bradley-holt,項目名稱:zf2,代碼行數:14,代碼來源:EditorTest.php

示例8: testContentPaneMarkupShouldNotContainNameAttribute

 /**
  * @group ZF-3877
  */
 public function testContentPaneMarkupShouldNotContainNameAttribute()
 {
     $html = $this->view->plugin('contentPane')->__invoke('pane1', 'This is the pane content', array('id' => 'pane', 'title' => 'Pane 1'));
     $this->assertNotContains('name="/', $html, $html);
     DojoHelper::setUseProgrammatic();
     $html = $this->view->plugin('contentPane')->__invoke('pane1', 'This is the pane content', array('id' => 'pane', 'title' => 'Pane 1'));
     $this->assertNotContains('name="/', $html, $html);
 }
開發者ID:rafalwrzeszcz,項目名稱:zf2,代碼行數:11,代碼來源:ContentPaneTest.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::_unsetInstance();
     DojoHelper::setUseDeclarative();
     $this->view = $this->getView();
     $this->decorator = new TabContainerDecorator();
     $this->element = $this->getElement();
     $this->element->setView($this->view);
     $this->decorator->setElement($this->element);
 }
開發者ID:alab1001101,項目名稱:zf2,代碼行數:16,代碼來源:TabContainerTest.php

示例10: 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::_unsetInstance();
     DojoHelper::setUseDeclarative();
     $this->errors = array();
     $this->view = $this->getView();
     $this->decorator = new DijitElementDecorator();
     $this->element = $this->getElement();
     $this->element->setView($this->view);
     $this->decorator->setElement($this->element);
 }
開發者ID:alab1001101,項目名稱:zf2,代碼行數:17,代碼來源:DijitElementTest.php

示例11: testHelperShouldAllowDisablingParseOnLoadWithDeclarativeStyle

 /**
  * @group ZF-3962
  */
 public function testHelperShouldAllowDisablingParseOnLoadWithDeclarativeStyle()
 {
     DojoHelper::setUseDeclarative();
     $this->helper->requireModule('dijit.layout.ContentPane')
                  ->setDjConfigOption('parseOnLoad', 'false')
                  ->enable();
     $html = $this->helper->__toString();
     if (!preg_match('/(var djConfig = .*?(?:};))/s', $html, $matches)) {
         $this->fail('Failed to find djConfig settings: ' . $html);
     }
     $this->assertNotContains('"parseOnLoad":true', $matches[1]);
 }
開發者ID:noose,項目名稱:zf2,代碼行數:15,代碼來源:DojoTest.php

示例12: testComboBoxInSubFormShouldCreateJsonStoreBasedOnQualifiedId

 /**
  * @group ZF-7134
  * @group ZF-7266
  */
 public function testComboBoxInSubFormShouldCreateJsonStoreBasedOnQualifiedId()
 {
     DojoHelper::setUseProgrammatic();
     $this->element->setStoreId('foo')->setStoreType('dojo.data.ItemFileReadStore')->setStoreParams(array('url' => '/foo'));
     $subform = new SubForm(array('name' => 'bar'));
     $subform->addElement($this->element);
     $html = $this->element->render();
     $dojo = $this->view->dojo()->__toString();
     $this->assertContains('"store":"foo"', $dojo, $dojo);
 }
開發者ID:rmarshall-quibids,項目名稱:zf2,代碼行數:14,代碼來源:ComboBoxTest.php

示例13: testStoreCreationWhenUsingProgrammaticCreationShouldRegisterAsDojoJavascript

 /**
  * @group ZF-5987
  * @group ZF-7266
  */
 public function testStoreCreationWhenUsingProgrammaticCreationShouldRegisterAsDojoJavascript()
 {
     DojoHelper::setUseProgrammatic(true);
     $html = $this->getElementAsRemoter();
     $js = $this->view->plugin('dojo')->getJavascript();
     $this->assertContains('var stateStore;', $js);
     $onLoad = $this->view->plugin('dojo')->_getZendLoadActions();
     $storeDeclarationFound = false;
     foreach ($onLoad as $statement) {
         if (strstr($statement, 'stateStore = new ')) {
             $storeDeclarationFound = true;
             break;
         }
     }
     $this->assertTrue($storeDeclarationFound, 'Store definition not found');
 }
開發者ID:RomanShumkov,項目名稱:zf2,代碼行數:20,代碼來源:ComboBoxTest.php

示例14: testShouldAllowProgrammaticDijitCreationAsRemoter

 public function testShouldAllowProgrammaticDijitCreationAsRemoter()
 {
     DojoHelper::setUseProgrammatic();
     $html = $this->getElementAsRemoter();
     $this->assertNotRegexp('/<input[^>]*(dojoType="dijit.form.FilteringSelect")/', $html);
     $this->assertRegexp('/<input[^>]*(type="text")/', $html);
     $this->assertNotNull($this->view->plugin('dojo')->getDijit('elementId'));
     $this->assertContains('var stateStore;', $this->view->plugin('dojo')->getJavascript());
     $found = false;
     $scripts = $this->view->plugin('dojo')->_getZendLoadActions();
     foreach ($scripts as $js) {
         if (strstr($js, 'stateStore = new ')) {
             $found = true;
             break;
         }
     }
     $this->assertTrue($found, 'No store declaration found: ' . var_export($scripts, 1));
 }
開發者ID:rafalwrzeszcz,項目名稱:zf2,代碼行數:18,代碼來源:FilteringSelectTest.php

示例15: __toString

 /**
  * String representation of dojo environment
  *
  * @return string
  */
 public function __toString()
 {
     if (!$this->isEnabled()) {
         return '';
     }
     $this->_isXhtml = $this->view->plugin('doctype')->isXhtml();
     if (DojoHelper::useDeclarative()) {
         if (null === $this->getDjConfigOption('parseOnLoad')) {
             $this->setDjConfigOption('parseOnLoad', true);
         }
     }
     if (!empty($this->_dijits)) {
         $this->registerDijitLoader();
     }
     $html = $this->_renderStylesheets() . PHP_EOL . $this->_renderDjConfig() . PHP_EOL . $this->_renderDojoScriptTag() . PHP_EOL . $this->_renderLayers() . PHP_EOL . $this->_renderExtras();
     return $html;
 }
開發者ID:rafalwrzeszcz,項目名稱:zf2,代碼行數:22,代碼來源:Container.php


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