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


PHP Zend_Form::addSubform方法代碼示例

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


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

示例1: getAutoForm

 protected function getAutoForm($formType = 'main_entity')
 {
     if ($this->autoForm == null) {
         $id = $this->getOperationalEntityId();
         $action = "/admin/{$this->controllerName}/edit/" . ($id ? "id/{$id}" : '');
         $form = new Zend_Form(array('action' => $action, 'method' => 'post'));
         // Build AutoCrud
         $autoForm = new Awe_Form_AutoMagic($formType, $this->doctrineColumns, $this->getOperationalEntity());
         $form->addSubform($autoForm, 'awe_form');
         $this->autoForm = $form;
     }
     return $this->autoForm;
 }
開發者ID:rocksolidwebdesign,項目名稱:AweCMS,代碼行數:13,代碼來源:AutoMagic.php

示例2: testMultiFileWithOneFile

 public function testMultiFileWithOneFile()
 {
     $form = new Zend_Form();
     $element = new Zend_Form_Element_File('file');
     $element->setMultiFile(1);
     $subform0 = new Zend_Form_SubForm();
     $subform0->addElement($element);
     $subform1 = new Zend_Form_SubForm();
     $subform1->addSubform($subform0, 'subform0');
     $subform2 = new Zend_Form_SubForm();
     $subform2->addSubform($subform1, 'subform1');
     $subform3 = new Zend_Form_SubForm();
     $subform3->addSubform($subform2, 'subform2');
     $form->addSubform($subform3, 'subform3');
     $form->setView(new Zend_View());
     $output = (string) $form;
     $this->assertNotContains('name="file[]"', $output);
 }
開發者ID:omusico,項目名稱:logica,代碼行數:18,代碼來源:FileTest.php

示例3: testMultiFileInSubSubSubform

 public function testMultiFileInSubSubSubform()
 {
     $form = new Zend_Form();
     $element = new Zend_Form_Element_File('file');
     $element->setMultiFile(2);
     $subform0 = new Zend_Form_SubForm();
     $subform0->addElement($element);
     $subform1 = new Zend_Form_SubForm();
     $subform1->addSubform($subform0, 'subform0');
     $subform2 = new Zend_Form_SubForm();
     $subform2->addSubform($subform1, 'subform1');
     $subform3 = new Zend_Form_SubForm();
     $subform3->addSubform($subform2, 'subform2');
     $form->addSubform($subform3, 'subform3');
     $form->setView(new Zend_View());
     $output = (string) $form;
     $this->assertContains('name="file[]"', $output);
     $this->assertEquals(2, substr_count($output, 'file[]'));
 }
開發者ID:lortnus,項目名稱:zf1,代碼行數:19,代碼來源:FileTest.php


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