Mage_Adminhtml_Block_Newsletter_Problem Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Newsletter_Problem:

Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 __construct ()
 getUnsubscribeButtonHtml ()
 getDeleteButtonHtml ()
 getShowButtons ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Problem.php.


Constructor & Destructor Documentation

__construct (  ) 

Constructor

By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes

Reimplemented from Varien_Object.

Definition at line 37 of file Problem.php.

00038     {
00039         parent::__construct();
00040         $this->setTemplate('newsletter/problem/list.phtml');
00041         $collection = Mage::getResourceSingleton('newsletter/problem_collection')
00042             ->addSubscriberInfo()
00043             ->addQueueInfo();
00044 
00045     }


Member Function Documentation

_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 47 of file Problem.php.

00048     {
00049         $this->setChild('grid',
00050             $this->getLayout()->createBlock('adminhtml/newsletter_problem_grid','newsletter.problem.grid')
00051         );
00052 
00053         $this->setChild('deleteButton',
00054             $this->getLayout()->createBlock('adminhtml/widget_button','del.button')
00055                 ->setData(
00056                     array(
00057                         'label' => Mage::helper('newsletter')->__('Delete Selected Problems'),
00058                         'onclick' => 'problemController.deleteSelected();'
00059                     )
00060                 )
00061         );
00062 
00063         $this->setChild('unsubscribeButton',
00064             $this->getLayout()->createBlock('adminhtml/widget_button','unsubscribe.button')
00065                 ->setData(
00066                     array(
00067                         'label' => Mage::helper('newsletter')->__('Unsubscribe Selected'),
00068                         'onclick' => 'problemController.unsubscribe();'
00069                     )
00070                 )
00071         );
00072         return parent::_prepareLayout();
00073     }

getDeleteButtonHtml (  ) 

Definition at line 80 of file Problem.php.

00081     {
00082         return $this->getChildHtml('deleteButton');
00083     }

getShowButtons (  ) 

Definition at line 85 of file Problem.php.

00086     {
00087         return  Mage::getResourceSingleton('newsletter/problem_collection')->getSize() > 0;
00088     }

getUnsubscribeButtonHtml (  ) 

Definition at line 75 of file Problem.php.

00076     {
00077         return $this->getChildHtml('unsubscribeButton');
00078     }


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

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