Public Member Functions | |
__construct () | |
getDeleteButtonHtml () | |
getAddButtonHtml () | |
Protected Member Functions | |
_toHtml () | |
_prepareLayout () |
Definition at line 33 of file List.php.
__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 35 of file List.php.
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 56 of file List.php.
00057 { 00058 $this->setChild('deleteButton', 00059 $this->getLayout()->createBlock('adminhtml/widget_button') 00060 ->setData(array( 00061 'label' => Mage::helper('poll')->__('Delete'), 00062 'onclick' => 'answer.del(this)', 00063 'class' => 'delete f-right' 00064 )) 00065 ); 00066 00067 $this->setChild('addButton', 00068 $this->getLayout()->createBlock('adminhtml/widget_button') 00069 ->setData(array( 00070 'label' => Mage::helper('poll')->__('Add New Answer'), 00071 'onclick' => 'answer.add(this)', 00072 'class' => 'add' 00073 )) 00074 ); 00075 return parent::_prepareLayout(); 00076 }
_toHtml | ( | ) | [protected] |
Render block HTML
Reimplemented from Mage_Core_Block_Template.
Definition at line 40 of file List.php.
00041 { 00042 if( !Mage::registry('poll_data') ) { 00043 $this->assign('answers', false); 00044 return parent::_toHtml(); 00045 } 00046 00047 $collection = Mage::getModel('poll/poll_answer') 00048 ->getResourceCollection() 00049 ->addPollFilter(Mage::registry('poll_data')->getId()) 00050 ->load(); 00051 $this->assign('answers', $collection); 00052 00053 return parent::_toHtml(); 00054 }
getAddButtonHtml | ( | ) |
Definition at line 83 of file List.php.
00084 { 00085 return $this->getChildHtml('addButton'); 00086 }
getDeleteButtonHtml | ( | ) |
Definition at line 78 of file List.php.
00079 { 00080 return $this->getChildHtml('deleteButton'); 00081 }