Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action:

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract Mage_Adminhtml_Block_Abstract Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Object $row)


Detailed Description

Definition at line 35 of file Action.php.


Member Function Documentation

render ( Varien_Object row  ) 

Renders column

Parameters:
Varien_Object $row
Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action.

Definition at line 37 of file Action.php.

00038     {
00039         $actions = array();
00040 
00041 
00042         if($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_NEVER) {
00043             if(!$row->getQueueStartAt() && $row->getSubscribersTotal()) {
00044                 $actions[] = array(
00045                     'url' => $this->getUrl('*/*/start', array('id'=>$row->getId())),
00046                     'caption'   => Mage::helper('newsletter')->__('Start')
00047                 );
00048             }
00049         } else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_SENDING) {
00050             $actions[] = array(
00051                     'url' => $this->getUrl('*/*/pause', array('id'=>$row->getId())),
00052                     'caption'   =>  Mage::helper('newsletter')->__('Pause')
00053             );
00054 
00055             $actions[] = array(
00056                 'url'       =>  $this->getUrl('*/*/cancel', array('id'=>$row->getId())),
00057                 'confirm'   =>  Mage::helper('newsletter')->__('Do you really want to cancel the queue?'),
00058                 'caption'   =>  Mage::helper('newsletter')->__('Cancel')
00059             );
00060 
00061 
00062         } else if ($row->getQueueStatus()==Mage_Newsletter_Model_Queue::STATUS_PAUSE) {
00063 
00064             $actions[] = array(
00065                 'url' => $this->getUrl('*/*/resume', array('id'=>$row->getId())),
00066                 'caption'   =>  Mage::helper('newsletter')->__('Resume')
00067             );
00068 
00069         }
00070 
00071         $actions[] = array(
00072             'url'       =>  $this->getUrl('*/newsletter_template/preview',array('id'=>$row->getTemplateId())),
00073             'caption'   =>  Mage::helper('newsletter')->__('Preview'),
00074             'popup'     =>  true
00075         );
00076 
00077         $this->getColumn()->setActions($actions);
00078         return parent::render($row);
00079     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:22:51 2009 for Magento by  doxygen 1.5.8