本文整理汇总了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类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: render
/**
* Override for immediate action on a delivery
*
* @param Varien_Object $row
* @return string
*/
public function render(Varien_Object $row)
{
$actions = array();
if ($row->isCancelable()) {
$actions[] = array('url' => $this->getUrl('*/postpurchase/cancel', array('id' => $row->getId())), 'caption' => $this->__('Cancel'), 'confirm' => $this->__('Are you sure you want to cancel the %s for order #%s?', $row->getPostName(), $row->getOrderIncrementId()));
}
$actions[] = array('url' => $this->getUrl('*/postpurchase/delete', array('id' => $row->getId())), 'caption' => $this->__('Purge'), 'confirm' => $this->__('Are you sure you want to purge the %s for order #%s?', $row->getPostName(), $row->getOrderIncrementId()));
$this->getColumn()->setActions($actions);
return parent::render($row);
}
开发者ID:bevello,项目名称:bevello,代码行数:16,代码来源:Action.php
示例17: render
/**
* Render grid row
*
* @param Varien_Object $row
* @return string
*/
public function render(Varien_Object $row)
{
$actions = array(array('caption' => $this->__('Preview'), 'url' => $this->getUrl('*/*/previewQueue', array('id' => $row->getId())), 'popup' => true));
if ($row->getStatus() == Mage_XmlConnect_Model_Queue::STATUS_IN_QUEUE) {
$actions[] = array('caption' => $this->__('Edit'), 'url' => $this->getUrl('*/*/editQueue', array('id' => $row->getId())));
$actions[] = array('caption' => $this->__('Cancel'), 'url' => $this->getUrl('*/*/cancelQueue', array('id' => $row->getId())), 'confirm' => $this->__('Are you sure you want to cancel a message?'));
}
$actions[] = array('caption' => $this->__('Delete'), 'url' => $this->getUrl('*/*/deleteQueue', array('id' => $row->getId())), 'confirm' => $this->__('Are you sure you want to delete a message?'));
$this->getColumn()->setActions($actions);
return parent::render($row);
}
开发者ID:cewolf2002,项目名称:magento,代码行数:17,代码来源:Action.php
示例18: render
public function render(Varien_Object $row)
{
if (in_array($row->getTypeId(), array('simple', 'virtual', 'downloadable'))) {
$actions[] = array('url' => "javascript:InventoryManager.save('" . $this->getUrl('*/*/save', array('id' => $row->getId())) . "','" . $row->getId() . "')", 'caption' => Mage::helper('advancedinventory')->__('Save'), 'id' => 'save');
if (Mage::getModel('pointofsale/pointofsale')->getPlaces()->count()) {
if (Mage::getStoreConfig("advancedinventory/setting/lock_online_stock")) {
$actions[] = array('caption' => Mage::helper('advancedinventory')->__("Sync. global stock"), 'url' => "javascript:InventoryManager.recalculate( " . $row->getId() . ")", 'id' => 'synchronize');
}
$actions[] = array('caption' => Mage::helper('advancedinventory')->__(!$row->getManageLocalStock() ? Mage::helper('advancedinventory')->__("Enable local stocks") : Mage::helper('advancedinventory')->__("Disable local stocks")), 'url' => "javascript:InventoryManager.displayLocalStocks( " . $row->getId() . "," . (!$row->getManageLocalStock() ? "true" : "false") . ")", 'id' => 'enable');
}
}
$actions[] = array('url' => $this->getUrl('adminhtml/catalog_product/edit', array('id' => $row->getId(), "tab" => "product_info_tabs_inventory")), 'caption' => Mage::helper('advancedinventory')->__('Edit'), 'popup' => true, 'id' => 'edit');
$this->getColumn()->setActions($actions);
return parent::render($row);
}
开发者ID:rcclaudrey,项目名称:dev,代码行数:15,代码来源:Action.php
示例19: render
public function render(Varien_Object $row)
{
$actions = array();
$actions[] = array('url' => $this->getUrl('*/*/edit', array('id' => $row->getId())), 'caption' => $this->__('Edit'));
$stores = Mage::app()->getStores(true);
if (is_array($stores) && count($stores) >= 1) {
foreach ($stores as $store) {
if (Mage::helper('bronto_email')->isEnabled('store', $store->getId())) {
$actions[] = array('url' => $this->getUrl('*/*/massImport', array('template_id' => $row->getId(), 'store_id' => $store->getId())), 'caption' => $this->__('Import For Store: ' . (!$store->getId() ? 'Default' : $store->getName())), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to import the selected template?'));
}
}
}
$actions[] = array('url' => $this->getUrl('*/*/massDelete', array('template_id' => $row->getId(), 'delete_level' => 'full')), 'caption' => $this->__('Delete'), 'confirm' => Mage::helper('bronto_email')->__('Are you sure you want to delete the selected template?'));
$this->getColumn()->setActions($actions);
return parent::render($row);
}
开发者ID:bevello,项目名称:bevello,代码行数:16,代码来源:Action.php
示例20: render
public function render(Varien_Object $row)
{
$url = $this->getUrl('*/*/verified', array('id' => $row->getId()));
$url1 = $this->getUrl('*/*/invalid', array('id' => $row->getId()));
if ($row->getStatus() == 0) {
$html = '<select id="' . $row->getId() . '" style="display:none;" onchange="varienGridAction.execute(this);" class="action-select"><option value=""></option><option value="{"class":"verified","title":"Unverified","href":"' . $url . '"}">Verified</option><option value="{"class":"invalid","title":"Invalid","href":"' . $url1 . '"}">Invalid</option></select><a class="verified" onclick="$("' . $row->getId() . '").show();$(this).hide();" title="Unverified">Verified</a>';
return $html;
} elseif ($row->getStatus() == 1) {
$this->getColumn()->setActions(array(array('url' => $this->getUrl("*/*/unverified", array("id" => $row->getId())), 'caption' => Mage::helper('docupload')->__('Unverified'), 'class' => 'unverified', 'title' => 'Verified')));
} elseif ($row->getStatus() == 3) {
$this->getColumn()->setActions(array(array('caption' => Mage::helper('docupload')->__('Invalid Doc'), 'class' => 'invalid', 'title' => 'Invalid Doc')));
} else {
$this->getColumn()->setActions(array(array('caption' => Mage::helper('docupload')->__('Not Applicable'), 'class' => 'not_applicable', 'title' => 'Not Applicable')));
}
return parent::render($row);
}
开发者ID:shebin512,项目名称:Magento_Zoff,代码行数:16,代码来源:Action.php
注:本文中的Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论