Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Selection Class Reference

Inheritance diagram for Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Selection:

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

 __construct ()
 getFieldId ()
 getFieldName ()
 getSelectionDeleteButtonHtml ()
 getPriceTypeSelectHtml ()
 getQtyTypeSelectHtml ()
 getSelectionSearchUrl ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Selection.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 36 of file Selection.php.

00037     {
00038         $this->setTemplate('bundle/product/edit/bundle/option/selection.phtml');
00039     }


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 51 of file Selection.php.

00052     {
00053         $this->setChild('selection_delete_button',
00054             $this->getLayout()->createBlock('adminhtml/widget_button')
00055                 ->setData(array(
00056                     'label' => Mage::helper('catalog')->__('Delete'),
00057                     'class' => 'delete icon-btn',
00058                     'on_click' => 'bSelection.remove(event)'
00059                 ))
00060         );
00061 
00062         return parent::_prepareLayout();
00063     }

getFieldId (  ) 

Definition at line 41 of file Selection.php.

00042     {
00043         return 'bundle_selection';
00044     }

getFieldName (  ) 

Definition at line 46 of file Selection.php.

00047     {
00048         return 'bundle_selections';
00049     }

getPriceTypeSelectHtml (  ) 

Definition at line 70 of file Selection.php.

00071     {
00072         $select = $this->getLayout()->createBlock('adminhtml/html_select')
00073             ->setData(array(
00074                 'id' => $this->getFieldId().'_{{index}}_price_type',
00075                 'class' => 'select select-product-option-type required-option-select'
00076             ))
00077             ->setName($this->getFieldName().'[{{parentIndex}}][{{index}}][selection_price_type]')
00078             ->setOptions(Mage::getSingleton('bundle/source_option_selection_price_type')->toOptionArray());
00079 
00080         return $select->getHtml();
00081     }

getQtyTypeSelectHtml (  ) 

Definition at line 83 of file Selection.php.

00084     {
00085         $select = $this->getLayout()->createBlock('adminhtml/html_select')
00086             ->setData(array(
00087                 'id' => $this->getFieldId().'_{{index}}_can_change_qty',
00088                 'class' => 'select'
00089             ))
00090             ->setName($this->getFieldName().'[{{parentIndex}}][{{index}}][selection_can_change_qty]')
00091             ->setOptions(Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray());
00092 
00093         return $select->getHtml();
00094     }

getSelectionDeleteButtonHtml (  ) 

Definition at line 65 of file Selection.php.

00066     {
00067         return $this->getChildHtml('selection_delete_button');
00068     }

getSelectionSearchUrl (  ) 

Definition at line 96 of file Selection.php.

00097     {
00098         return $this->getUrl('bundle/selection/search');
00099     }


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

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