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


PHP Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract::_renderCellTemplate方法代码示例

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


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

示例1: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "template") {
         $collection = Mage::getResourceModel('core/email_template_collection')->load();
         $arr_select = $collection->toOptionArray();
         array_unshift($arr_select, array('label' => Mage::helper('rewardpoints')->__('Default'), 'value' => ''));
         return $this->_getTemplateRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:260px"')->setOptions($arr_select)->toHtml();
     } else {
         if ($columnName == "sender") {
             $arr_select = array();
             $config = Mage::getSingleton('adminhtml/config')->getSection('trans_email')->groups->children();
             foreach ($config as $node) {
                 $nodeName = $node->getName();
                 $label = (string) $node->label;
                 $sortOrder = (int) $node->sort_order;
                 $arr_select[$sortOrder] = array('value' => preg_replace('#^ident_(.*)$#', '$1', $nodeName), 'label' => Mage::helper('adminhtml')->__($label));
             }
             ksort($arr_select);
             /*array_unshift(
                   $arr_select,
                   array(
                       'label' => Mage::helper('rewardpoints')->__('Default'),
                       'value' => ''
                   )
               );*/
             return $this->_getSenderRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:260px"')->setOptions($arr_select)->toHtml();
         }
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:31,代码来源:Mapfields.php

示例2: _renderCellTemplate

 /**
  * Render array cell for prototypeJS template
  *
  * @param string $columnName
  * @return string
  */
 protected function _renderCellTemplate($columnName)
 {
     if ($columnName == 'value' && isset($this->_columns[$columnName])) {
         $element = new Varien_Data_Form_Element_Select();
         $element->setForm($this->getForm())->setName($this->_getCellInputElementName($columnName))->setHtmlId($this->_getCellInputElementId('#{_id}', $columnName))->setValues(Mage::getModel('Mage_Core_Model_Design_Source_Design')->getAllOptions(false));
         return str_replace("\n", '', $element->getElementHtml());
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:nemphys,项目名称:magento2,代码行数:15,代码来源:Regexceptions.php

示例3: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "attribute") {
         return $this->_getAttributeRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions($this->getElement()->getValues())->toHtml();
     } elseif ($columnName == "datafield") {
         return $this->_getDatafieldRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions(Mage::getModel('ddg_automation/adminhtml_source_datafields')->toOptionArray())->toHtml();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:dotmailer,项目名称:dotmailer-magento-extension,代码行数:10,代码来源:Customdatafields.php

示例4: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     if (!empty($this->_columns[$columnName]) && $this->_columns[$columnName]['renderer']) {
         $column = $this->_columns[$columnName];
         $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
         $html = $column['renderer']->setColumn($column)->setColumnName($columnName)->setInputName($inputName)->toHtml();
         return $this->jsQuoteEscape($html);
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:technomagegithub,项目名称:inmed-magento,代码行数:10,代码来源:Configuration.php

示例5: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     if ($columnName == "code") {
         return $this->_renderAttributesDropdown();
     }
     if ($columnName == "category_id") {
         return $this->_renderCategoriesDropdown();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:atlanticbt,项目名称:atlanticbt_layerednavigation,代码行数:10,代码来源:Filterrules.php

示例6: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "payment_method") {
         return $this->_getPaymentRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:260px"')->setClass('validate-select')->setOptions(Mage::getModel("adminhtml/system_config_source_payment_allowedmethods")->toOptionArray(NULL))->toHtml();
     } elseif ($columnName == "fee") {
         $this->_columns[$columnName]['class'] = 'input-text required-entry validate-number';
         $this->_columns[$columnName]['style'] = 'width:50px';
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:kirchbergerknorr,项目名称:payment-fee,代码行数:11,代码来源:Fee.php

示例7: _renderCellTemplate

 /**
  * overide method _renderCellTemplate in Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
  * this is needed to display custom dynamic fieldset and inject custom element
  *
  * @see Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
  *
  * @param string $columnName
  *
  * @return void
  */
 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     switch ($columnName) {
         case 'type':
             return $this->_getTypeRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:50px"')->setOptions($this->getElement()->getValues())->toHtml();
             break;
         default:
             return parent::_renderCellTemplate($columnName);
             break;
     }
 }
开发者ID:Mohitsahu123,项目名称:Elasticgento,代码行数:22,代码来源:Nodes.php

示例8: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "process_once") {
         $arr_select = array(array("label" => Mage::helper('rewardpoints')->__('No'), "value" => "0"), array("label" => Mage::helper('rewardpoints')->__('Yes'), "value" => "1"));
         return $this->_getProcessOnceRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:60px"')->setOptions($arr_select)->toHtml();
     }
     if ($columnName == "model_id") {
         $arr_select = array(array("label" => Mage::helper('rewardpoints')->__('No'), "value" => "0"), array("label" => Mage::helper('rewardpoints')->__('Yes'), "value" => "1"));
         return $this->_getModelIdRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:60px"')->setOptions($arr_select)->toHtml();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:13,代码来源:Mapfieldsevents.php

示例9: _renderCellTemplate

 /**
  * Render array cell for prototypeJS template
  *
  * @param string $columnName
  * @return string
  */
 protected function _renderCellTemplate($columnName)
 {
     if (empty($this->_columns[$columnName])) {
         throw new Exception('Wrong column name specified.');
     }
     $column = $this->_columns[$columnName];
     $elementName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     $extraParams = ' data-value="#{' . $columnName . '}" ' . (isset($column['style']) ? ' style="' . $column['style'] . '"' : '');
     if ($columnName == 'installments') {
         return $this->getInstallmentsSelectHtml($elementName, $extraParams);
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:thiagormartins,项目名称:iugu-magento,代码行数:19,代码来源:Interest.php

示例10: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "template") {
         return $this->_getTemplateRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions($this->getElement()->getValues())->toHtml();
     } elseif ($columnName == "sendtype") {
         return $this->_getSendtypeRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions(Mage::getModel('email_connector/adminhtml_source_transactional_sendtype')->toOptionArray())->toHtml();
     } elseif ($columnName == "datafield") {
         return $this->_getDatafieldRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions(Mage::getModel('email_connector/adminhtml_source_transactional_campaigns')->toOptionArray())->toHtml();
     } elseif ($columnName == "fromaddress") {
         return $this->_getFromadddressRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions(Mage::getModel('email_connector/adminhtml_source_transactional_fromaddress')->toOptionArray())->toHtml();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:vdimitrovv,项目名称:dotmailer-magento-extension,代码行数:14,代码来源:Templatefields.php

示例11: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "calculation_type_referrer" || $columnName == "calculation_type_referred") {
         /*$arr_select = array(
               array("label" => Mage::helper('rewardpoints')->__('No'), "value" => "0"),
               array("label" => Mage::helper('rewardpoints')->__('Yes'), "value" => "1")
           );*/
         $arr_select = Mage::getModel('rewardpoints/calculationtype')->toOptionArray();
         return $this->_getCalculationTypeReferrerRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:80px"')->setOptions($arr_select)->toHtml();
     }
     if ($columnName == "date_from" || $columnName == "date_end") {
         return $this->_getDateRenderer()->setName($inputName)->setTitle($columnName)->setImage(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . '/adminhtml/default/default/images/grid-cal.gif')->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT))->setExtraParams('style="width:65px"')->toHtml();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:16,代码来源:Mapfieldsreferral.php

示例12: _renderCellTemplate

 protected function _renderCellTemplate($columnName)
 {
     $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
     if ($columnName == "group_id") {
         $collection = Mage::getResourceModel('customer/group_collection')->load();
         $arr_select = $collection->toOptionArray();
         return $this->_getCustomerGroupRenderer($columnName)->setName($inputName . '[]')->setTitle($columnName)->setExtraParams('style="width:90px"')->setIsMultiSelect(1)->setOptions($arr_select)->setClass("j2t_customdelivery_countries")->setExtraParams('multiple="multiple" size="5"')->toHtml();
         /*return $this->_getCustomerGroupRenderer()
           ->setName($inputName)
           ->setTitle($columnName)
           ->setIsMultiSelect(1)
           ->setExtraParams('style="width:180px" multiple="multiple" size="5"')
           ->setOptions($arr_select)
           ->toHtml();*/
     }
     if ($columnName == "date_from" || $columnName == "date_end") {
         return $this->_getDateRenderer()->setName($inputName)->setTitle($columnName)->setImage(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . '/adminhtml/default/default/images/grid-cal.gif')->setFormat(Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT))->setExtraParams('style="width:110px"')->toHtml();
     }
     return parent::_renderCellTemplate($columnName);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:20,代码来源:Mapfieldspoints.php

示例13: _renderCellTemplate

 /**
  *
  * My renderer does need parameters that are not supported by original implementation
  *
  * @param string $columnName
  * @return ITwebexperts_Payperrentals_Block_Adminhtml_Global_Dates_Excluded
  * @throws Exception
  */
 protected function _renderCellTemplate($_columnName)
 {
     $_inputName = $this->getElement()->getName() . '[#{_id}][' . $_columnName . ']';
     $_block = $this->_getFieldBlock($_columnName);
     if ($_block !== false) {
         $_block->setName($_inputName)->setTitle($_columnName)->setId('exclude_dates_row_#{_id}_' . $_columnName);
         if ($_columnName == 'disabled_from' || $_columnName == 'disabled_to') {
             $_block->setValue('#{' . $_columnName . '}');
         }
         return $this->_jsStringEscapeForHtml($_block->toHtml());
     } else {
         return parent::_renderCellTemplate($_columnName);
     }
 }
开发者ID:hueyl77,项目名称:fourwindsgear,代码行数:22,代码来源:Excluded.php


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