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


PHP Zend_Dojo_View_Helper_Dojo::setUseProgrammatic方法代码示例

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


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

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

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

示例3: _initDojo

 protected function _initDojo()
 {
     $this->bootstrap('view');
     $view = $this->getResource('view');
     $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
     $view->dojo()->setLocalPath('/js/dojo/dojo.js');
     $view->dojo()->addStylesheetModule('dijit.themes.tundra');
     $view->dojo()->setDjConfigOption('usePlainJson', true);
     $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
     $viewRenderer->setView($view);
     Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
 }
开发者ID:joseph-montanez,项目名称:ZendTickets,代码行数:13,代码来源:Bootstrap.php

示例4: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $html = $this->getElement();
     $this->assertNotRegexp('/<input[^>]*(dojoType="dijit.form.ValidationTextBox")/', $html);
     $this->assertNotNull($this->view->dojo()->getDijit('elementId'));
 }
开发者ID:omusico,项目名称:logica,代码行数:7,代码来源:ValidationTextBoxTest.php

示例5: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $html = $this->getContainer();
     $this->assertNotRegexp('/<div[^>]*(dojoType="dijit.layout.TabContainer")/', $html);
     $this->assertNotNull($this->view->dojo()->getDijit('container'));
 }
开发者ID:lortnus,项目名称:zf1,代码行数:7,代码来源:TabContainerTest.php

示例6: testStoreCreationWhenUsingProgrammaticCreationShouldRegisterAsDojoJavascript

 /**
  * @group ZF-5987
  * @group ZF-7266
  */
 public function testStoreCreationWhenUsingProgrammaticCreationShouldRegisterAsDojoJavascript()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(true);
     $html = $this->getElementAsRemoter();
     $js = $this->view->dojo()->getJavascript();
     $this->assertContains('var stateStore;', $js);
     $onLoad = $this->view->dojo()->_getZendLoadActions();
     $storeDeclarationFound = false;
     foreach ($onLoad as $statement) {
         if (strstr($statement, 'stateStore = new ')) {
             $storeDeclarationFound = true;
             break;
         }
     }
     $this->assertTrue($storeDeclarationFound, 'Store definition not found');
 }
开发者ID:netvlies,项目名称:zf,代码行数:20,代码来源:ComboBoxTest.php

示例7: testComboBoxInSubFormShouldCreateJsonStoreBasedOnQualifiedId

 /**
  * @group ZF-7134
  * @group ZF-7266
  */
 public function testComboBoxInSubFormShouldCreateJsonStoreBasedOnQualifiedId()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $this->element->setStoreId('foo')->setStoreType('dojo.data.ItemFileReadStore')->setStoreParams(array('url' => '/foo'));
     include_once 'Zend/Form/SubForm.php';
     $subform = new Zend_Form_SubForm(array('name' => 'bar'));
     $subform->addElement($this->element);
     $html = $this->element->render();
     $dojo = $this->view->dojo()->__toString();
     $this->assertContains('"store":"foo"', $dojo, $dojo);
 }
开发者ID:omusico,项目名称:logica,代码行数:15,代码来源:ComboBoxTest.php

示例8: testShouldAllowProgrammaticDijitCreation

 public function testShouldAllowProgrammaticDijitCreation()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $html = $this->getForm();
     $this->assertNotRegexp('/<form[^>]*(dojoType="dijit.form.Form")/', $html);
     $this->assertNotNull($this->view->dojo()->getDijit('myForm'));
 }
开发者ID:ThorstenSuckow,项目名称:conjoon,代码行数:7,代码来源:FormTest.php

示例9: testHelperInProgrammaticModeShouldGenerateDivWithoutPassedDojoType

 public function testHelperInProgrammaticModeShouldGenerateDivWithoutPassedDojoType()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $content = $this->view->customDijit('foo', 'content', array('dojoType' => 'custom.Dijit'));
     $this->assertNotContains('dojoType="custom.Dijit"', $content);
 }
开发者ID:omusico,项目名称:logica,代码行数:6,代码来源:CustomDijitTest.php

示例10: testInvalidFlagPassedToUseProgrammaticShouldUseProgrammaticWithScripts

 public function testInvalidFlagPassedToUseProgrammaticShouldUseProgrammaticWithScripts()
 {
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic('foo');
     $this->assertFalse(Zend_Dojo_View_Helper_Dojo::useProgrammaticNoScript());
     $this->assertTrue(Zend_Dojo_View_Helper_Dojo::useProgrammatic());
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:6,代码来源:DojoTest.php

示例11: testShouldAllowProgrammaticDijitCreationAsRemoter

    public function testShouldAllowProgrammaticDijitCreationAsRemoter()
    {
        Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
        $html = $this->getElementAsRemoter();
        $this->assertNotRegexp('/<input[^>]*(dojoType="dijit.form.FilteringSelect")/', $html);
        $this->assertRegexp('/<input[^>]*(type="text")/', $html);
        $this->assertNotNull($this->view->dojo()->getDijit('elementId'));

        $found = false;
        $scripts = $this->view->dojo()->getJavascript();
        foreach ($scripts as $js) {
            if (strstr($js, 'var stateStore;')) {
                $found = true;
                break;
            }
        }
        $this->assertTrue($found, 'No store declaration found: ' . var_export($scripts, 1));
    }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:18,代码来源:FilteringSelectTest.php

示例12: testContentPaneMarkupShouldNotContainNameAttribute

 /**
  * @group ZF-3877
  */
 public function testContentPaneMarkupShouldNotContainNameAttribute()
 {
     $html = $this->view->contentPane('pane1', 'This is the pane content', array('id' => 'pane', 'title' => 'Pane 1'));
     $this->assertNotContains('name="/', $html, $html);
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
     $html = $this->view->contentPane('pane1', 'This is the pane content', array('id' => 'pane', 'title' => 'Pane 1'));
     $this->assertNotContains('name="/', $html, $html);
 }
开发者ID:netvlies,项目名称:zf,代码行数:11,代码来源:ContentPaneTest.php

示例13: testShouldAllowSpecifyingProgrammaticDijitCreationWithNoScriptGeneration

 public function testShouldAllowSpecifyingProgrammaticDijitCreationWithNoScriptGeneration()
 {
     $this->testShouldUseDeclarativeDijitCreationByDefault();
     Zend_Dojo_View_Helper_Dojo::setUseProgrammatic(-1);
     $this->assertTrue(Zend_Dojo_View_Helper_Dojo::useProgrammatic());
     $this->assertTrue(Zend_Dojo_View_Helper_Dojo::useProgrammaticNoScript());
 }
开发者ID:bhaumik25,项目名称:zend-framework,代码行数:7,代码来源:DojoTest.php


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