Mage_Adminhtml_Block_Newsletter_Queue_Edit Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Queue_Edit:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getQueue ()
 getSaveUrl ()
 getToggleButtonHtml ()
 getSaveButtonHtml ()
 getResetButtonHtml ()
 getBackButtonHtml ()
 getResumeButtonHtml ()
 getIsPreview ()
 getIsTextType ()
 getCanResume ()
 getHeaderText ()

Protected Member Functions

 _beforeToHtml ()
 _prepareLayout ()


Detailed Description

Definition at line 35 of file Edit.php.


Member Function Documentation

_beforeToHtml (  )  [protected]

Before rendering html, but after trying to load cache

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 47 of file Edit.php.

00047                                         {
00048 
00049         $this->setTemplate('newsletter/queue/edit.phtml');
00050 
00051         $this->setChild('form',
00052             $this->getLayout()->createBlock('adminhtml/newsletter_queue_edit_form','form')
00053         );
00054 
00055         return parent::_beforeToHtml();
00056     }

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 63 of file Edit.php.

00064     {
00065         $this->setChild('save_button',
00066             $this->getLayout()->createBlock('adminhtml/widget_button')
00067                 ->setData(array(
00068                     'label'     => Mage::helper('newsletter')->__('Save Newsletter'),
00069                     'onclick'   => 'queueControl.save()',
00070                     'class'     => 'save'
00071                 ))
00072         );
00073 
00074         $this->setChild('save_and_resume',
00075             $this->getLayout()->createBlock('adminhtml/widget_button')
00076                 ->setData(array(
00077                     'label'     => Mage::helper('newsletter')->__('Save And Resume'),
00078                     'onclick'   => 'queueControl.resume()',
00079                     'class'     => 'save'
00080                 ))
00081         );
00082 
00083         $this->setChild('reset_button',
00084             $this->getLayout()->createBlock('adminhtml/widget_button')
00085                 ->setData(array(
00086                     'label'     => Mage::helper('newsletter')->__('Reset'),
00087                     'onclick'   => 'window.location = window.location'
00088                 ))
00089         );
00090 
00091         $this->setChild('back_button',
00092             $this->getLayout()->createBlock('adminhtml/widget_button')
00093                 ->setData(
00094                     array(
00095                         'label'   => Mage::helper('newsletter')->__('Back'),
00096                         'onclick' => "window.location.href = '" . $this->getUrl('*/*') . "'",
00097                         'class'     => 'back'
00098                     )
00099                 )
00100         );
00101 
00102         $this->setChild('toggle_button',
00103             $this->getLayout()->createBlock('adminhtml/widget_button')
00104                 ->setData(
00105                     array(
00106                         'label'   => Mage::helper('newsletter')->__('Toggle Editor'),
00107                         'onclick' => 'queueControl.toggleEditor();'
00108                     )
00109                 )
00110         );
00111         return parent::_prepareLayout();
00112     }

getBackButtonHtml (  ) 

Definition at line 129 of file Edit.php.

00130     {
00131         return $this->getChildHtml('back_button');
00132     }

getCanResume (  ) 

Definition at line 152 of file Edit.php.

00153     {
00154         return in_array($this->getQueue()->getQueueStatus(), array(
00155             Mage_Newsletter_Model_Queue::STATUS_PAUSE
00156         ));
00157     }

getHeaderText (  ) 

Definition at line 159 of file Edit.php.

00160     {
00161         return ( $this->getIsPreview() ? Mage::helper('newsletter')->__('View Newsletter') : Mage::helper('newsletter')->__('Edit Newsletter'));
00162     }

getIsPreview (  ) 

Definition at line 139 of file Edit.php.

00140     {
00141         return !in_array($this->getQueue()->getQueueStatus(), array(
00142             Mage_Newsletter_Model_Queue::STATUS_NEVER,
00143             Mage_Newsletter_Model_Queue::STATUS_PAUSE
00144         ));
00145     }

getIsTextType (  ) 

Definition at line 147 of file Edit.php.

00148     {
00149         return $this->getQueue()->getTemplate()->isPlain();
00150     }

getQueue (  ) 

Retrieve current Newsletter Queue Object

Returns:
Mage_Newsletter_Model_Queue

Definition at line 42 of file Edit.php.

00043     {
00044         return Mage::registry('current_queue');
00045     }

getResetButtonHtml (  ) 

Definition at line 124 of file Edit.php.

00125     {
00126         return $this->getChildHtml('reset_button');
00127     }

getResumeButtonHtml (  ) 

Definition at line 134 of file Edit.php.

00135     {
00136         return $this->getChildHtml('save_and_resume');
00137     }

getSaveButtonHtml (  ) 

Definition at line 119 of file Edit.php.

00120     {
00121         return $this->getChildHtml('save_button');
00122     }

getSaveUrl (  ) 

Definition at line 58 of file Edit.php.

00059     {
00060         return $this->getUrl('*/*/save',array('id'=>$this->getRequest()->getParam('id')));
00061     }

getToggleButtonHtml (  ) 

Definition at line 114 of file Edit.php.

00115     {
00116         return $this->getChildHtml('toggle_button');
00117     }


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