本文整理汇总了PHP中Zend_Dojo_View_Helper_Dojo类的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Dojo_View_Helper_Dojo类的具体用法?PHP Zend_Dojo_View_Helper_Dojo怎么用?PHP Zend_Dojo_View_Helper_Dojo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Zend_Dojo_View_Helper_Dojo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testDeclarativeUseShouldRenderTextareaWithSimpleTextareaDojoType
public function testDeclarativeUseShouldRenderTextareaWithSimpleTextareaDojoType()
{
Zend_Dojo_View_Helper_Dojo::setUseDeclarative(true);
$html = $this->element->render();
$this->assertContains('id="foo"', $html);
$this->assertContains('<textarea', $html);
$this->assertContains('dojoType="dijit.form.SimpleTextarea"', $html);
}
开发者ID:kadvani1,项目名称:pastebin,代码行数:8,代码来源: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()
{
Zend_Registry::_unsetInstance();
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$this->view = $this->getView();
$this->helper = new Zend_Dojo_View_Helper_Editor();
$this->helper->setView($this->view);
}
开发者ID:jsnshrmn,项目名称:Suma,代码行数:14,代码来源:EditorTest.php
示例3: testDeclarativeUseShouldCreateTextareaWithSimpleTextareaDojoType
public function testDeclarativeUseShouldCreateTextareaWithSimpleTextareaDojoType()
{
Zend_Dojo_View_Helper_Dojo::setUseDeclarative(true);
$html = $this->helper->simpleTextarea('foo', 'seeded text');
$this->assertContains('id="foo"', $html);
$this->assertContains('<textarea', $html);
$this->assertContains('dojoType="dijit.form.SimpleTextarea"', $html);
}
开发者ID:kadvani1,项目名称:pastebin,代码行数:8,代码来源:SimpleTextareaTest.php
示例4: changepasswordAction
public function changepasswordAction()
{
Zend_Layout::getMvcInstance()->disableLayout();
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$form = new Application_Form_ChangePasswordForm();
$form->change->setAttrib('onclick', 'changePassword();');
$this->view->changePasswordForm = $form;
}
开发者ID:Nerutiz,项目名称:trades,代码行数:8,代码来源:AccountController.php
示例5: 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()
{
Zend_Registry::_unsetInstance();
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$this->view = $this->getView();
$this->element = $this->getElement();
$this->element->setView($this->view);
}
开发者ID:omusico,项目名称:logica,代码行数:14,代码来源:ButtonTest.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()
{
Zend_Registry::_unsetInstance();
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$this->view = $this->getView();
$this->decorator = new Zend_Dojo_Form_Decorator_SplitContainer();
$this->element = $this->getElement();
$this->element->setView($this->view);
$this->decorator->setElement($this->element);
}
开发者ID:lortnus,项目名称:zf1,代码行数:16,代码来源:SplitContainerTest.php
示例7: preDispatch
/**
* Pre-Dispatch: set up dojo and context switching
*
* @return void
*/
public function preDispatch()
{
$request = $this->getRequest();
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$contextSwitch = $this->_helper->contextSwitch;
if (!$contextSwitch->hasContext('ajax')) {
$contextSwitch->addContext('ajax', array('suffix' => 'ajax'))->addActionContext('new', 'ajax')->addActionContext('followup', 'ajax')->addActionContext('display', 'ajax')->addActionContext('active', 'ajax')->addActionContext('active-data', 'ajax')->addActionContext('active-data-count', 'ajax')->initContext();
}
$message = array('Current request information', array(array('Module', 'Controller', 'Action'), array($request->getModuleName(), $request->getControllerName(), $request->getActionName())));
Zend_Registry::get('log')->table($message);
}
开发者ID:stm555,项目名称:pastebin,代码行数:16,代码来源:PasteController.php
示例8: init
public function init()
{
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$this->view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
$session = $this->getRequest()->getCookie('sessionid');
$this->lib = new MetaNAS_Lib_MiniDLNA();
/*
* We need to make sure the user viewing this is logged in the MetaNAS GUI
* Pass the sessionid via JSON-RPC and make sure it has access
*/
$this->lib->isAuthorized($session);
}
开发者ID:BillTheBest,项目名称:MetaNAS,代码行数:12,代码来源:IndexController.php
示例9: _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
示例10: init
public function init()
{
$this->view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$layout = $this->_helper->layout;
$root = realpath(dirname(__FILE__) . '/../../../');
$layout->setLayoutPath(ZUPAL_LAYOUT_PATH);
$layout->setLayout('default');
$this->view->placeholder('base_path')->set($this->getFrontController()->getBaseUrl());
// note -- deprecated, using ZUPAL_BASEURL constant.
// $this->view->dojo()
// ->setLocalPath(ZUPAL_BASEURL . DS . 'scripts/Dojo/dojo/dojo.js')
//->requireModule('dijit.form.Form')
// ->setDjConfigOption('dojoBlankHtmUrl', '/blank.html');
}
开发者ID:BGCX262,项目名称:zupal-svn-to-git,代码行数:15,代码来源:Abstract.php
示例11: dispatchLoopStartup
/**
* dispatchLoopStartup
*
* @param Zend_Controller_Request_Abstract $oRequest
* @return void
*/
public function dispatchLoopStartup(Zend_Controller_Request_Abstract $oRequest)
{
// Hack DOJO
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$contextSwitch = Zend_Controller_Action_HelperBroker::getStaticHelper('ContextSwitch');
$contextParam = $contextSwitch->getContextParam();
$format = $oRequest->getParam($contextParam);
// Inject javascript vars
if (!$format or $format == "html" or $format == "html-json" or $format == "html-xml") {
$this->_view->dojo()->setDjConfigOption('ZlBaseUrl', $this->_view->baseUrl());
$this->_view->dojo()->setDjConfigOption('ZlBaseThemeUrl', $this->_view->baseThemeUrl());
$this->_view->dojo()->setDjConfigOption('ZlModule', $oRequest->getModuleName());
$this->_view->dojo()->setDjConfigOption('ZlController', $oRequest->getControllerName());
$this->_view->dojo()->setDjConfigOption('ZlAction', $oRequest->getActionName());
}
}
开发者ID:BGCX261,项目名称:zlayer-svn-to-git,代码行数:22,代码来源:Dojo.php
示例12: getForm
public static function getForm()
{
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
$form = new Zend_Form();
$form->setDecorators(array(array('ViewScript', array('viewScript' => 'editor/changesForm.phtml'))));
$zdate = new Zend_Date();
$e = new Zend_Dojo_Form_Element_DateTextBox('fromDate', array('label' => 'From', 'required' => true));
$e->setAttrib('onchange', 'admin.currentManObj.refresh()');
$form->addElement($e);
$e = new Zend_Dojo_Form_Element_DateTextBox('toDate', array('label' => 'To', 'required' => true));
$e->setAttrib('onchange', 'admin.currentManObj.refresh()');
$form->addElement($e);
// $e = new Zend_Dojo_Form_Element_Button( 'refresh', array ('label' => 'Refresh' ) );
// $e->setAttrib('onchange', 'admin.currentManObj.refresh()');
// $form->addElement($e);
Zend_Dojo::enableForm($form);
$form->setDefaults(array('toDate' => $zdate->getIso(), 'fromDate' => $zdate->getIso()));
return $form;
}
开发者ID:TDMU,项目名称:contingent5_statserver,代码行数:19,代码来源:Changes.php
示例13: 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
示例14: 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
示例15: 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
示例16: testShouldAllowProgrammaticDijitCreation
public function testShouldAllowProgrammaticDijitCreation()
{
Zend_Dojo_View_Helper_Dojo::setUseProgrammatic();
$html = $this->getElement();
$this->assertNotRegexp('/<div[^>]*(dojoType="dijit.form.HorizontalSlider")/', $html);
$this->assertNotNull($this->view->dojo()->getDijit('elementId-slider'));
}
开发者ID:omusico,项目名称:logica,代码行数:7,代码来源:HorizontalSliderTest.php
示例17: 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
示例18: initView
/**
* Initialize view and layouts
*
* @param bool $doLayout
* @return My_Plugin_Initialize
*/
public function initView($doLayout = true)
{
$view = new Zend_View();
$view->addHelperPath('My/View/Helper/', 'My_View_Helper');
$view->addHelperPath(APPLICATION_PATH . '/views/helpers', 'Zend_View_Helper');
$view->addHelperPath(APPLICATION_PATH . '/modules/spindle/views/helpers', 'Spindle_View_Helper');
Zend_Dojo::enableView($view);
Zend_Dojo_View_Helper_Dojo::setUseDeclarative(true);
$view->baseUrl = rtrim($this->getRequest()->getBaseUrl(), '/');
$view->doctype('XHTML1_STRICT');
$view->headTitle()->setSeparator(' - ')->append('Spindle');
$view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
$view->dojo()->setDjConfigOption('isDebug', $this->config->view->dojo->isDebug)->setLocalPath('/js/dojo/dojo.js')->registerModulePath('../spindle', 'spindle')->addStylesheetModule('spindle.themes.spindle')->requireModule('spindle.main')->disable();
Zend_Registry::set('view', $view);
if ($doLayout) {
$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer->setView($view);
$layout = Zend_Layout::startMvc(array('layoutPath' => $this->config->appPath . '/layouts/scripts'));
}
return $this;
}
开发者ID:kadvani1,项目名称:pastebin,代码行数:27,代码来源:Initialize.php
示例19: 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:jorgenils,项目名称:zend-framework,代码行数:6,代码来源:DojoTest.php
示例20: testShouldJsonEncodeConstraints
public function testShouldJsonEncodeConstraints()
{
$html = $this->getElement();
if (!preg_match('/constraints="(.*?)(" )/', $html, $m)) {
$this->fail('Did not serialize constraints');
}
$constraints = str_replace("'", '"', $m[1]);
if (Zend_Dojo_View_Helper_Dojo::useDeclarative()) {
// Convert ' to "'" for json_decode. See Zend_Dojo_View_Helper_Dijit::_prepareDijit() (line 254)
$constraints = str_replace(''', '"', $constraints);
}
$constraints = Zend_Json::decode($constraints);
$this->assertTrue(is_array($constraints), var_export($m[1], 1));
$this->assertTrue(array_key_exists('min', $constraints));
$this->assertTrue(array_key_exists('max', $constraints));
$this->assertTrue(array_key_exists('places', $constraints));
}
开发者ID:sasezaki,项目名称:mirror-zf1-tests,代码行数:17,代码来源:NumberSpinnerTest.php
注:本文中的Zend_Dojo_View_Helper_Dojo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论