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


PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action类代码示例

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


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

示例1: _transformActionData

 /**
  * Prepares action data for html render
  *
  * @param array $action
  * @param string $actionCaption
  * @param Varien_Object $row
  * @return Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
  */
 protected function _transformActionData(&$action, &$actionCaption, Varien_Object $row)
 {
     foreach ($action as $attibute => $value) {
         if (isset($action[$attibute]) && !is_array($action[$attibute])) {
             $this->getColumn()->setFormat($action[$attibute]);
             $action[$attibute] = parent::render($row);
         } else {
             $this->getColumn()->setFormat(null);
         }
         switch ($attibute) {
             case 'caption':
                 $actionCaption = $action['caption'];
                 unset($action['caption']);
                 break;
             case 'url':
                 if (is_array($action['url'])) {
                     $params = array($action['field'] => $this->_getValue($row));
                     if (isset($action['url']['params'])) {
                         $params = array_merge($action['url']['params'], $params);
                     }
                     $action['href'] = $this->getUrl($action['url']['base'], $params);
                     unset($action['field']);
                 } else {
                     $action['href'] = $action['url'];
                 }
                 unset($action['url']);
                 break;
             case 'popup':
                 $action['onclick'] = 'popWin(this.href, \'windth=800,height=700,resizable=1,scrollbars=1\');return false;';
                 break;
         }
     }
     return $this;
 }
开发者ID:BarryCarlyon,项目名称:enhancedgrid,代码行数:42,代码来源:Action.php

示例2: render

 public function render(Varien_Object $row)
 {
     $url = $this->getUrl('*/adminhtml_abandonedreport/preview', array('id' => $row->getData('id_fila_envio')));
     $actions[] = array('caption' => Mage::helper('cartabandoned')->__('Preview'), 'onclick' => "window.open('" . $url . "','page','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=1000,height=800,menubar=no,directories=no');  return false;");
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:az2009,项目名称:modulos-magento,代码行数:7,代码来源:Action.php

示例3: render

 public function render(Varien_Object $row)
 {
     if ($this->isShowElement($row)) {
         return parent::render($row);
     }
     return "";
 }
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:7,代码来源:Actions.php

示例4: _toLinkHtml

 /**
  * Render single action as link html
  *
  * @param array $action
  * @param Varien_Object $row
  * @return string
  */
 protected function _toLinkHtml($action, Varien_Object $row)
 {
     if ($row->isEnterpriseProcess()) {
         return ' ';
     }
     return parent::_toLinkHtml($action, $row);
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:14,代码来源:Action.php

示例5: render

 public function render(Varien_Object $row)
 {
     $sendType = $row->getTemplateSendType();
     $actions = array();
     // Edit Action
     $actions[] = array('url' => $this->getUrl('*/*/brontoEdit', array('id' => $row->getId())), 'caption' => $this->__('Edit'));
     // Delete Action
     $actions[] = array('url' => $this->getUrl('*/*/massDelete', array('template_id' => $row->getId())), 'caption' => $this->__('Delete'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to delete the selected template?  If this template is currently assigned to be used, it will automatically be reassigned to the default Magento template.'));
     switch ($sendType) {
         case 'transactional':
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'marketing')), 'caption' => $this->__('Set to Bronto Marketing'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Bronto as a marketing message?'));
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'magento')), 'caption' => $this->__('Set to Magento Email'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Magento?'));
             break;
         case 'magento':
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'transactional')), 'caption' => $this->__('Set to Bronto Transactional'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Bronto as a transactional message?'));
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'marketing')), 'caption' => $this->__('Set to Bronto Marketing'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Bronto as a marketing message?'));
             break;
         default:
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'transactional')), 'caption' => $this->__('Set to Bronto Transactional'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Bronto as a transactional message?'));
             $actions[] = array('url' => $this->getUrl('*/*/updateSendType', array('template_id' => $row->getId(), 'send_type' => 'magento')), 'caption' => $this->__('Set to Magento Email'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to set this template to send through Magento?'));
             break;
     }
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:25,代码来源:Action.php

示例6: render

 /**
  * Renders action link only if shipment has the valid status
  *
  * @param  Varien_Object    $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $actions = $this->getColumn()->getActions();
     if ($row->getStatus() == Dhl_Intraship_Model_Shipment::STATUS_PROCESSED || $row->getStatus() == Dhl_Intraship_Model_Shipment::STATUS_CLOSED) {
         return parent::render($row);
     }
 }
开发者ID:igorvasiliev4,项目名称:magento_code,代码行数:13,代码来源:Action.php

示例7: render

 public function render(Varien_Object $row)
 {
     $actions = array();
     $actions[] = array('url' => $this->getUrl('*/newsletter_queue/preview', array('id' => $row->getId())), 'caption' => Mage::helper('newsletter')->__('Preview'), 'popup' => true);
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:sagmahajan,项目名称:aswan_release,代码行数:7,代码来源:Action.php

示例8: render

 public function render(Varien_Object $row)
 {
     $actions[] = array('url' => $this->getUrl('*/*/edit', array('item_id' => $row->getId())), 'caption' => Mage::helper('robots')->__('Edit'));
     $actions[] = array('url' => $this->getUrl('*/*/delete', array('item_id' => $row->getId())), 'caption' => Mage::helper('robots')->__('Delete'), 'confirm' => Mage::helper('robots')->__('Are you sure you want to delete this item ?'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:macosxvn,项目名称:techheroes,代码行数:7,代码来源:Action.php

示例9: render

 public function render(Varien_Object $row)
 {
     $actions = array();
     $actions[] = array('url' => Mage::getModel('adminhtml/url')->setQueryParam('id', $row->getId())->getUrl('*/*/edit'), 'caption' => $this->__('View'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:7,代码来源:Action.php

示例10: render

 public function render(Varien_Object $row)
 {
     $actions = array();
     $actions[] = array('url' => $this->getUrl('*/*/preview', array('id' => $row->getId())), 'popup' => true, 'caption' => $this->__('Preview'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:natxetee,项目名称:magento2,代码行数:7,代码来源:Action.php

示例11: render

 public function render(Varien_Object $row)
 {
     $actions = array();
     $curWebsite = $this->getRequest()->getParam('website');
     $curStore = $this->getRequest()->getParam('store');
     $aParams = array();
     if ($curWebsite) {
         $aParams['website'] = $curWebsite;
     }
     if ($curStore) {
         $aParams['store'] = $curStore;
     }
     if (!$aParams) {
         list($aParams['scope'], $aParams['scopeid']) = Mage::getModel('aitemails/aitemails')->getCurrentScope();
     }
     $aParams['fromaitemails'] = 1;
     if ($row->getCustomTemplate()) {
         $aParams['id'] = $row->getCustomTemplateId();
         $actions[] = array('url' => $this->getUrl('adminhtml/system_email_template/edit', $aParams), 'caption' => $this->__('Edit Custom Template'));
     } else {
         $aParams['templatecode'] = $row->getCode();
         $aParams['localecode'] = Mage::registry('aitemails_email_template_scope_locale');
         $aParams['scope'] = $row->getScope();
         $aParams['scopeid'] = $row->getScopeId();
         $actions[] = array('url' => $this->getUrl('adminhtml/system_email_template/new', $aParams), 'caption' => $this->__('Create Custom Template'));
     }
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:29,代码来源:Action.php

示例12: render

 /**
  * Renders column
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     if ($row->getStatus() != OnePica_AvaTax_Model_Records_Queue::QUEUE_STATUS_FAILED) {
         return '';
     }
     return parent::render($row);
 }
开发者ID:onepica,项目名称:avatax,代码行数:13,代码来源:QueueAction.php

示例13: render

 public function render(Varien_Object $object)
 {
     $actions = array();
     /* delete */
     $actions[] = array('url' => $this->getUrl('*/*/delete', array('id' => $object->getId())), 'caption' => Mage::helper('points')->__('Delete'), 'confirm' => Mage::helper('points')->__('Are you sure?'));
     $this->getColumn()->setActions($actions);
     return parent::render($object);
 }
开发者ID:HPTTeam,项目名称:hackathon,代码行数:8,代码来源:Action.php

示例14: render

 public function render(Varien_Object $row)
 {
     if ($row->isValidForSend()) {
         $actions[] = array('url' => $this->getUrl('*/newsletter_queue/edit', array('template_id' => $row->getId())), 'caption' => Mage::helper('newsletter')->__('Queue Newsletter...'));
     }
     $actions[] = array('url' => $this->getUrl('*/*/preview', array('id' => $row->getId())), 'popup' => true, 'caption' => Mage::helper('newsletter')->__('Preview'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:9,代码来源:Action.php

示例15: render

 /**
  * Override for immediate action on a recommendation
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $actions = array();
     $actions[] = array('url' => $this->getUrl('*/*/edit', array('id' => $row->getId())), 'caption' => $this->__('Edit'));
     $actions[] = array('url' => $this->getUrl('*/*/copy', array('id' => $row->getId())), 'caption' => $this->__('Copy'), 'confirm' => $this->__('Are you sure you want to copy the selected recommendation?'));
     $actions[] = array('url' => $this->getUrl('*/*/delete', array('id' => $row->getId())), 'caption' => $this->__('Delete'), 'confirm' => $this->__('Are you sure you want to delete the selected recommendation?'));
     $actions[] = array('url' => $this->getUrl('*/*/preview', array('entity_id' => $row->getId(), 'ret' => 'index')), 'caption' => $this->__('Preview'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:bevello,项目名称:bevello,代码行数:16,代码来源:Action.php


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