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


PHP Zend_Dojo_View_Helper_Dojo::setUseDeclarative方法代码示例

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


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

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

示例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_FilteringSelect();
     $this->helper->setView($this->view);
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:14,代码来源:FilteringSelectTest.php

示例3: 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_AccordionContainer();
     $this->helper->setView($this->view);
 }
开发者ID:stunti,项目名称:zf2,代码行数:14,代码来源:AccordionContainerTest.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()
 {
     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

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

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

示例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()
 {
     Zend_Registry::_unsetInstance();
     Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
     $this->view = $this->getView();
     $this->helper = new Zend_Dojo_View_Helper_ValidationTextBox();
     $this->helper->setView($this->view);
 }
开发者ID:omusico,项目名称:logica,代码行数:14,代码来源:ValidationTextBoxTest.php

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

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

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

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

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

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

示例14: editAction

 public function editAction()
 {
     $request = $this->getRequest();
     $id = $request->getParam('NODEID', -1);
     $ntid = $request->getParam('NODETYPEID');
     Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
     $this->view->addHelperPath('Uman/Dojo/View/Helper/', 'Uman_Dojo_View_Helper');
     $form = new Uman_Admin_Form();
     $form->setName('nodeEditorForm');
     $form->setAttrib('jsId', 'nodeEditorForm');
     $form->setAction('/admin/editor/save');
     $form->setMethod('post');
     $form->setEnctype('multipart/form-data');
     $dbModel = new Admin_Model_Admin();
     $nodeeditorInfo = $dbModel->getNodeEditorInfo($ntid);
     $fields = $dbModel->getEditorFields($nodeeditorInfo['DEFAULT_EDITOR_NODEID']);
     $parentidExists = false;
     $nodetypeidExists = false;
     $js_oncreate = '';
     $js_beforesubmit = '';
     foreach ($fields as $field) {
         if (!$field['VISIBLE']) {
             continue;
         }
         if ($field['FIELDNAME'] == 'PARENTID') {
             $parentidExists = true;
         } else {
             if ($field['FIELDNAME'] == 'NODETYPEID') {
                 $nodetypeidExists = true;
             }
         }
         $class = $field['ELEMENT_CLASS'];
         $e = new $class($field['FIELDNAME']);
         //			$e->setName($fieldName);
         if (!empty($field['ELEMENT_CONFIG'])) {
             /*
              * In php.ini must be:
              * allow_url_include = on;
              * allow_url_fopen = on;
             */
             $elem_cfg = new Zend_Config_Ini('data://,' . $field['ELEMENT_CONFIG']);
             $elem_cfg = $elem_cfg->toArray();
             $e->setOptions($elem_cfg);
         }
         $e->setLabel($field['TITLE']);
         //			if (@$field['REQUIRED'])
         $e->setRequired($field['REQUIRED']);
         switch ($class) {
             case 'Zend_Form_Element_Hidden':
                 $decor = array('ViewHelper');
                 break;
             case 'Zend_Form_Element_File':
                 //				$e->setMaxFileSize(1024);
                 $decor = $form->elementFileDecorators;
                 break;
             default:
                 $decor = $form->elementDecorators;
         }
         $e->setDecorators($decor);
         $form->addElement($e);
         $js_oncreate .= isset($field['JS_ONCREATE']) ? $field['JS_ONCREATE'] . "\n" : '';
         $js_beforesubmit .= isset($field['JS_BEFORESUBMIT']) ? $field['JS_BEFORESUBMIT'] . "\n" : '';
     }
     $e = new Zend_Dojo_Form_Element_SubmitButton('save', array('label' => 'Сохранить'));
     $e->setDecorators($form->buttonDecorators);
     $form->addElement($e);
     /*		$e = new Zend_Dojo_Form_Element_Button('cancel', array('label' => 'Отмена', 'onClick' => "dijit.byId('editorDialog').onCancel()"));
     		$e->setDecorators($form->buttonDecorators);
     		$form->addElement($e);*/
     $form->addElements(array($form->createElement('hidden', 'NODEID')->setDecorators(array('ViewHelper')), $form->createElement('hidden', 'MODE')->setDecorators(array('ViewHelper'))));
     if (!$nodetypeidExists) {
         $form->addElement($form->createElement('hidden', 'NODETYPEID')->setDecorators(array('ViewHelper')));
     }
     if (!$parentidExists) {
         $form->addElement($form->createElement('hidden', 'PARENTID')->setDecorators(array('ViewHelper')));
     }
     if ($request->isPost()) {
         $res = $form->processAjax($request->getPost());
         if ($res != 'true') {
             echo $res;
             exit;
         } else {
             //			if($form->isValid ( $request->getPost () )) {
             $dbModel->saveFieldsValues($fields, $request->getPost(), $nodeeditorInfo);
             //				$dbModel->copyResources ( $id, false );
             echo $res;
             // "<textarea>$res</textarea"; //OK for AJAX request
             exit;
         }
     } else {
         if ($id == -1) {
             // New page
             $pid = $request->getParam('PARENTID');
             $dbModel->checkRight($pid);
             $id = $dbModel->getNextId('GEN_TEMP_UID');
             $values = array_merge($dbModel->getNewValues($fields, $nodeeditorInfo), array('NODEID' => $id, 'PARENTID' => $pid, 'NODETYPEID' => $ntid, 'MODE' => 'ADD', 'SORTORDER' => $dbModel->getNextSortOrder($pid)));
             //				mkdir($this->_cfg['temp']['path'] . $id);
         } else {
             $dbModel->checkRight($id);
             $values = array_merge($dbModel->getFieldsValues($fields, $id, $nodeeditorInfo), array('MODE' => 'EDIT'));
//.........这里部分代码省略.........
开发者ID:TDMU,项目名称:contingent5_statserver,代码行数:101,代码来源:EditorController.php

示例15: mb_internal_encoding

mb_internal_encoding('UTF-8');
function require_func($func, $folder = '')
{
    if (function_exists($func)) {
        return;
    }
    require_once PATH_TO_FUNCS . $folder . '/' . $func . '.php';
}
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
$view = new Zend_View();
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
class AuthModel
{
    //регулярное выражение, описывающее разрешенные строки для имени пользователя (логина)
    const LOGIN_PARTIAL_REGEX = '^[a-zA-Z0-9_-]{3,32}$';
    const LOGIN_PARTIAL2_REGEX = '[a-zA-Z0-9_-]{3,32}';
    const LOGIN_REGEX = '/^[a-z0-9_-]{3,32}$/i';
    const LOGIN_MAX_LEN = 32;
    const EMAIL_PARTIAL_REGEX = '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$';
    const EMAIL_MAX_LEN = 128;
    const PWD_MIN_LEN = 6;
    const PWD_MAX_LEN = 64;
    const PWD_PARTIAL_REGEX = '^.{6,64}$';
    const VAR_FIELD_MAX_LEN = 64;
    const NAME_MAX_LEN = 48;
    const ICQNUM_MAX_CHARS = 16;
开发者ID:Tony133,项目名称:zf-web,代码行数:31,代码来源:Zend_Recaptcha_IE_broken2.php


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