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


PHP Zend_Form_Element_Textarea::getName方法代碼示例

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


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

示例1: __construct

 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->setName('class');
     $this->setIsArray(true);
     $classname = new Zend_Form_Element_Text(Model_ClassGenerator_FormToClass::$nameKey);
     $classname->setLabel('Class name')->setRequired(true)->addValidator('NotEmpty', true);
     $classComment = new Zend_Form_Element_Textarea(Model_ClassGenerator_FormToClass::$commentKey);
     $classComment->setLabel('Class comment/description');
     $classComment->setAttrib('cols', '50')->setAttrib('rows', '4');
     $persistenceOn = new Zend_Form_Element_Checkbox(Model_ClassGenerator_FormToClass::$withPersistenceKey);
     $persistenceOn->setLabel('Persistence ON');
     $table = new Zend_Form_Element_Text(Model_ClassGenerator_FormToClass::$tableKey);
     $table->setLabel('Database Table');
     $addFieldDynId = new Zend_Form_Element_Hidden('addFieldDynId');
     $addFieldDynId->setAttrib('id', 'addFieldDynId');
     $addFieldDynId->setValue(1);
     $attributesSf = self::getAttributeSubform();
     $this->addSubForm($attributesSf, 'attributes', 1);
     /*Use table decorator!
             require_once('../application/forms/Decorators/Table.php');
             $this->setDecorators(array(
     			'FormElements',
     			array('Table', array('doNotSetDecorators' => false)),
     			'Form'
     		));
             */
     $add = new Zend_Form_Element_Button('addAttribute');
     $add->setAttrib('id', 'addAttribute');
     $add->setLabel('Add Attribute');
     $remove = new Zend_Form_Element_Button('removeAttribute');
     $remove->setAttrib('id', 'removeAttribute');
     $remove->setLabel('Remove Attribute');
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setLabel('Play!')->setOrder(5);
     $this->addElements(array($classname, $classComment, $persistenceOn, $table));
     $this->addDisplayGroup(array($classname->getName(), $classComment->getName(), $persistenceOn->getName(), $table->getName()), 'Class properties')->setOrder(0);
     $this->addElements(array($add, $remove, $submit, $addFieldDynId));
     $this->addElement('hash', 'no_csrf_foo', array('salt' => 'unique'));
 }
開發者ID:JPustkuchen,項目名稱:phppcg,代碼行數:40,代碼來源:Class.php


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