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


PHP Zend_Form::setIsArray方法代碼示例

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


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

示例1: testCanSetArrayFlag

 public function testCanSetArrayFlag()
 {
     $this->testFormIsNotAnArrayByDefault();
     $this->form->setIsArray(true);
     $this->assertTrue($this->form->isArray());
     $this->form->setIsArray(false);
     $this->assertFalse($this->form->isArray());
 }
開發者ID:vicfryzel,項目名稱:zf,代碼行數:8,代碼來源:FormTest.php

示例2: getForm

 public function getForm($includeSubmit = false)
 {
     if ($this->_campaignForm instanceof Zend_Form) {
         $form = $this->_campaignForm;
     } else {
         $form = new Zend_Form();
         $form->setIsArray(true);
         $form->addElement('hidden', 'id');
         $form->addElement('text', 'name', array('label' => 'Campaign'));
         $nameField = $form->getelement('name');
         $nameField->setRequired(true);
         $this->_campaignForm = $form;
         $this->_populateForm();
         $form = $this->_campaignForm;
     }
     if ($includeSubmit) {
         $form->addElement('submit', 'submit');
     }
     return $form;
 }
開發者ID:stm555,項目名稱:tablegeeks,代碼行數:20,代碼來源:Campaign.php

示例3: getForm

 public function getForm($includeSubmit = false)
 {
     if ($this->_mediaForm instanceof Zend_Form) {
         $form = $this->_mediaForm;
     } else {
         $form = new Zend_Form();
         $form->setIsArray(true);
         $form->addElement('hidden', 'id');
         $form->addElement('text', 'name', array('label' => 'media'));
         $this->_mediaForm = $form;
         $this->_populateForm();
         $form = $this->_mediaForm;
     }
     if ($includeSubmit) {
         $form->addElement('submit', 'submit');
     }
     return $form;
 }
開發者ID:stm555,項目名稱:tablegeeks,代碼行數:18,代碼來源:Media.php

示例4: getForm

 public function getForm($includeSubmit = false)
 {
     if ($this->_sessionForm instanceof Zend_Form) {
         $form = $this->_sessionForm;
     } else {
         $form = new Zend_Form();
         $form->setIsArray(true);
         $form->addElement('hidden', 'id');
         $form->addSubForm($this->campaign->getForm(), 'campaign');
         $form->addElement('text', 'date', array('label' => 'Date'));
         $form->addElement('text', 'description', array('label' => 'Description'));
         $form->addElement('text', 'synopsis', array('label' => 'Synopsis'));
         $form->addElement('text', 'tags', array('label' => 'Tags'));
         $this->_sessionForm = $form;
         $this->_populateForm();
         $form = $this->_sessionForm;
     }
     if ($includeSubmit) {
         $form->addElement('submit', 'submit');
     }
     return $form;
 }
開發者ID:stm555,項目名稱:tablegeeks,代碼行數:22,代碼來源:Session.php


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