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


PHP Zend_Form_SubForm::getName方法代碼示例

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


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

示例1: isStored

 /**
  * Method check subform data is storage
  *
  * @param Zend_Form_SubForm|string $subForm
  * @return bool
  */
 public function isStored($subForm)
 {
     if ($subForm instanceof Zend_Form_SubForm) {
         $key = $subForm->getName();
     } else {
         $key = $subForm;
     }
     return $this->getSessionNamespace()->{$key} ? true : false;
 }
開發者ID:uglide,項目名稱:zfcore-transition,代碼行數:15,代碼來源:Multipage.php

示例2: subFormIsValid

 public function subFormIsValid(Zend_Form_SubForm $subForm, array $data)
 {
     $name = $subForm->getName();
     if ($subForm->isValid($data)) {
         $this->getSessionNamespace()->{$name} = $subForm->getValues();
         return true;
     }
     return false;
 }
開發者ID:swastikit,項目名稱:devotees,代碼行數:9,代碼來源:DevoteesController.php

示例3: addressSource

 /**
  * Insert radio buttons to activate data copy if checked. <br />
  * Depending on the radio checked, the address used will be extracted from
  * the profile or from a temporary table or empty.
  *
  * @param Zend_Form_SubForm $addressSubForm The subForm containing the
  *                                          address fields to duplicate.
  * @param Array             $options        Options to defined the radio buttons.
  *
  * @return void
  */
 public function addressSource($addressSubForm, $options = array())
 {
     if ($addressSubForm instanceof Zend_Form_SubForm || $addressSubForm instanceof Cible_Form_SubForm) {
         $name = $this->_parentForm . $addressSubForm->getName();
         if (empty($name)) {
             throw new Exception('Please, set this subform name in order to add the checkbox to duplicate address.');
         }
         $addrSource = new Zend_Form_Element_Radio('addrSource');
         $addrSource->addMultiOptions($options['choices']);
         $addrSource->setValue($options['default']);
         $addrSource->setDecorators(array('ViewHelper', array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'addrSource label_after_checkbox'))));
         $this->_form->addElement($addrSource);
         $this->_addJsActions($name . '-addrSource', 'addrSource');
     } else {
         throw new Exception('The parameter is not an instance of Zend_Form_SubForm or Cible_form_SubForm');
     }
 }
開發者ID:anunay,項目名稱:stentors,代碼行數:28,代碼來源:FormAddress.php


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