Mage_Adminhtml_Block_Widget_Grid_Massaction_Item Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Grid_Massaction_Item:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 setMassaction ($massaction)
 getMassaction ()
 setAdditionalActionBlock ($block)
 getAdditionalActionBlock ()
 getAdditionalActionBlockHtml ()

Protected Member Functions

 _createFromConfig (array $config)

Protected Attributes

 $_massaction = null


Detailed Description

Definition at line 35 of file Item.php.


Member Function Documentation

_createFromConfig ( array config  )  [protected]

Definition at line 82 of file Item.php.

00083     {
00084         $type = isset($config['type']) ? $config['type'] : 'default';
00085         switch($type) {
00086             default:
00087                 $blockClass = 'adminhtml/widget_grid_massaction_item_additional_default';
00088                 break;
00089         }
00090 
00091         $block = $this->getLayout()->createBlock($blockClass);
00092         $block->createFromConfiguration(isset($config['type']) ? $config['config'] : $config);
00093         return $block;
00094     }

getAdditionalActionBlock (  ) 

Retrive additional action block for this item

Returns:
Mage_Core_Block_Abstract

Definition at line 101 of file Item.php.

00102     {
00103         return $this->getChild('additional_action');
00104     }

getAdditionalActionBlockHtml (  ) 

Retrive additional action block HTML for this item

Returns:
string

Definition at line 111 of file Item.php.

00112     {
00113         return $this->getChildHtml('additional_action');
00114     }

getMassaction (  ) 

Retrive parent massaction block

Returns:
Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract

Definition at line 57 of file Item.php.

00058     {
00059         return $this->_massaction;
00060     }

setAdditionalActionBlock ( block  ) 

Set additional action block for this item

Parameters:
string|Mage_Core_Block_Abstract $block
Returns:
Mage_Adminhtml_Block_Widget_Grid_Massaction_Item

Definition at line 68 of file Item.php.

00069     {
00070         if(is_string($block)) {
00071             $block = $this->getLayout()->createBlock($block);
00072         } elseif (is_array($block)) {
00073             $block = $this->_createFromConfig($block);
00074         } elseif(!($block instanceof Mage_Core_Block_Abstract)) {
00075             Mage::throwException('Unknown block type');
00076         }
00077 
00078         $this->setChild('additional_action', $block);
00079         return $this;
00080     }

setMassaction ( massaction  ) 

Set parent massaction block

Parameters:
Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract $massaction
Returns:
Mage_Adminhtml_Block_Widget_Grid_Massaction_Item

Definition at line 46 of file Item.php.

00047     {
00048         $this->_massaction = $massaction;
00049         return $this;
00050     }


Member Data Documentation

$_massaction = null [protected]

Definition at line 38 of file Item.php.


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

Generated on Sat Jul 4 17:23:10 2009 for Magento by  doxygen 1.5.8