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


PHP Zend_Form_Element_File::render方法代碼示例

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


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

示例1: testMarkerInterfaceForFileElement

 public function testMarkerInterfaceForFileElement()
 {
     $this->element->setDecorators(array('ViewHelper'));
     $this->assertEquals(1, count($this->element->getDecorators()));
     try {
         $content = $this->element->render(new Zend_View());
         $this->fail();
     } catch (Zend_Form_Element_Exception $e) {
         $this->assertContains('No file decorator found', $e->getMessage());
     }
 }
開發者ID:jsnshrmn,項目名稱:Suma,代碼行數:11,代碼來源:FileTest.php

示例2: testCanChangeViewHelper

 /**
  * @group ZF-10519
  */
 public function testCanChangeViewHelper()
 {
     $element = new Zend_Form_Element_File('foo');
     $element->setView($this->getView());
     // Get output using default view helper
     $defaultOutput = $element->render();
     // Get output using mock view helper
     $element->helper = "formFileMock";
     $mockOutput = $element->render();
     // Ensure the view helper was changed
     $this->assertRegexp('/FormFileMock/s', $mockOutput);
     $this->assertNotEquals($defaultOutput, $mockOutput);
 }
開發者ID:sasezaki,項目名稱:mirror-zf1-tests,代碼行數:16,代碼來源:FileTest.php

示例3: render

 /**
  * Render form element
  *
  * @param  Zend_View_Interface $view
  * @return string
  */
 public function render(Zend_View_Interface $view = null)
 {
     $this->setBootstrapConfiguration();
     return $this->bsUtils->divFormGroup(parent::render($view));
 }
開發者ID:getJv,項目名稱:ModuleTeste,代碼行數:11,代碼來源:File.php

示例4: foreach

<?php

/*
	PHP 5.2.0
	ZF 1.6.2
	running this script throws the following in Zend_File_Transfer_Adapter_Abstract on my machine:
	PHP Notice: 
	Undefined variable: result in /Users/michel/web-lib/ZendFramework-1.6.2-minimal/library/Zend/File/Transfer/Adapter/Abstract.php on line 803 
	PHP Warning: Invalid argument supplied for foreach() in /Users/michel/web-lib/ZendFramework-1.6.2-minimal/library/Zend/Form/Element.php on line 524
*/
// edit as required:
set_include_path('/Users/michel/web-lib/ZendFramework-1.6.2-minimal/library');
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
$element = new Zend_Form_Element_File('test');
$element->setDecorators(array('ViewHelper'));
$element->setDestination('/tmp');
$element->clearFilters();
$element->render(new Zend_View());
開發者ID:Tony133,項目名稱:zf-web,代碼行數:19,代碼來源:ZFTAA.php


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