当前位置: 首页>>代码示例>>PHP>>正文


PHP Varien_Data_Form::addFieldNameSuffix方法代码示例

本文整理汇总了PHP中Varien_Data_Form::addFieldNameSuffix方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form::addFieldNameSuffix方法的具体用法?PHP Varien_Data_Form::addFieldNameSuffix怎么用?PHP Varien_Data_Form::addFieldNameSuffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Varien_Data_Form的用法示例。


在下文中一共展示了Varien_Data_Form::addFieldNameSuffix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _prepareForm

 /**
  * Prepare form before rendering HTML
  *
  * @return Enterprise_Staging_Block_Manage_Staging_Edit_Tabs_Website
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $config = Mage::getSingleton('enterprise_staging/staging_config');
     $log = $this->getLog();
     $staging = $log->getStaging();
     $fieldset = $form->addFieldset('general_fieldset', array('legend' => Mage::helper('enterprise_staging')->__('General Information')));
     $fieldset->addField('created_at', 'label', array('label' => Mage::helper('enterprise_staging')->__('Logged At'), 'value' => $this->formatDate($log->getCreatedAt(), 'medium', true)));
     $fieldset->addField('action', 'label', array('label' => Mage::helper('enterprise_staging')->__('Action'), 'value' => Mage::helper('enterprise_staging')->__($config->getActionLabel($log->getAction()))));
     $fieldset->addField('status', 'label', array('label' => Mage::helper('enterprise_staging')->__('Status'), 'value' => Mage::helper('enterprise_staging')->__($config->getStatusLabel($log->getStatus()))));
     $additionalData = $log->getAdditionalData();
     if (!empty($additionalData)) {
         $additionalData = unserialize($additionalData);
         if (is_array($additionalData)) {
             if (isset($additionalData['schedule_date'])) {
                 $fieldset->addField('schedule_date', 'label', array('label' => Mage::helper('enterprise_staging')->__('Schedule Date'), 'value' => Mage::helper('core')->formatDate($additionalData['schedule_date'], Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true)));
             }
             if (isset($additionalData['action_before_reset'])) {
                 $fieldset->addField('action_before_reset', 'label', array('label' => Mage::helper('enterprise_staging')->__('Action Before Resetting'), 'value' => Mage::helper('enterprise_staging')->__($config->getActionLabel($additionalData['action_before_reset']))));
             }
         }
     }
     if ($log->getAction() == Enterprise_Staging_Model_Staging_Config::ACTION_UNSCHEDULE_MERGE) {
         $mergerUrl = $this->getUrl('*/staging_manage/merge', array('id' => $staging->getId()));
         $fieldset->addField('link_to_staging_merge', 'link', array('href' => $mergerUrl, 'label' => Mage::helper('enterprise_staging')->__('Scheduled Merger'), 'value' => $mergerUrl));
     }
     $form->addFieldNameSuffix($this->getFieldNameSuffix());
     $this->setForm($form);
     return parent::_prepareForm();
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:35,代码来源:Form.php

示例2: _prepareForm

 /**
  * prepare the form
  * @access protected
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     $fieldset = $form->addFieldset(uniqid('fieldset_'), array('legend' => $this->__('Rewrite %s', $this->getIncrement())));
     foreach ($this->getStores() as $store) {
         $fieldset->addField('rewrite_' . $store->getId(), 'text', array('name' => 'store_' . $store->getId(), 'label' => $this->__('Store %s', $store->getName())));
     }
     $fieldset->addField('redirect', 'select', array('name' => 'redirect', 'label' => $this->__('Redirect'), 'options' => array('' => Mage::helper('adminhtml')->__('No'), 'R' => Mage::helper('adminhtml')->__('Temporary (302)'), 'RP' => Mage::helper('adminhtml')->__('Permanent (301)'))));
     $form->setHtmlIdPrefix('rewrite_' . $this->getIncrement() . '_');
     $form->addFieldNameSuffix('rewrite[' . $this->getIncrement() . ']');
     $this->setForm($form);
     return parent::_prepareForm();
 }
开发者ID:ThomasNegeli,项目名称:CmsRewrites,代码行数:18,代码来源:Line.php


注:本文中的Varien_Data_Form::addFieldNameSuffix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。