Public Member Functions | |
__construct () | |
getRotatecwButtonHtml () | |
getImageButtonHtml () | |
getRotateccwButtonHtml () | |
getResizeButtonHtml () | |
getJsObjectName () | |
getConfigJson () | |
getConfig () | |
Protected Member Functions | |
_prepareLayout () | |
_getButtonId ($buttonName) | |
Protected Attributes | |
$_config |
Definition at line 35 of file Editor.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 40 of file Editor.php.
00041 { 00042 parent::__construct(); 00043 $this->setTemplate('media/editor.phtml'); 00044 $this->getConfig()->setImage($this->getSkinUrl('images/image.jpg')); 00045 $this->getConfig()->setParams(); 00046 }
_getButtonId | ( | $ | buttonName | ) | [protected] |
Definition at line 93 of file Editor.php.
00094 { 00095 return $this->getHtmlId() . '-' . $buttonName; 00096 }
_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 48 of file Editor.php.
00049 { 00050 $this->setChild( 00051 'rotatecw_button', 00052 $this->getLayout()->createBlock('adminhtml/widget_button') 00053 ->addData(array( 00054 'id' => $this->_getButtonId('rotatecw'), 00055 'label' => Mage::helper('adminhtml')->__('Rotate CW'), 00056 'onclick' => $this->getJsObjectName() . '.rotateCw()' 00057 )) 00058 ); 00059 00060 $this->setChild( 00061 'rotateccw_button', 00062 $this->getLayout()->createBlock('adminhtml/widget_button') 00063 ->addData(array( 00064 'id' => $this->_getButtonId('rotateccw'), 00065 'label' => Mage::helper('adminhtml')->__('Rotate CCW'), 00066 'onclick' => $this->getJsObjectName() . '.rotateCCw()' 00067 )) 00068 ); 00069 00070 $this->setChild( 00071 'resize_button', 00072 $this->getLayout()->createBlock('adminhtml/widget_button') 00073 ->addData(array( 00074 'id' => $this->_getButtonId('upload'), 00075 'label' => Mage::helper('adminhtml')->__('Resize'), 00076 'onclick' => $this->getJsObjectName() . '.resize()' 00077 )) 00078 ); 00079 00080 $this->setChild( 00081 'image_button', 00082 $this->getLayout()->createBlock('adminhtml/widget_button') 00083 ->addData(array( 00084 'id' => $this->_getButtonId('image'), 00085 'label' => Mage::helper('adminhtml')->__('Get Image Base64'), 00086 'onclick' => $this->getJsObjectName() . '.getImage()' 00087 )) 00088 ); 00089 00090 return parent::_prepareLayout(); 00091 }
getConfig | ( | ) |
Retrive config object
Definition at line 143 of file Editor.php.
00144 { 00145 if(is_null($this->_config)) { 00146 $this->_config = new Varien_Object(); 00147 } 00148 00149 return $this->_config; 00150 }
getConfigJson | ( | ) |
getImageButtonHtml | ( | ) |
Definition at line 103 of file Editor.php.
00104 { 00105 return $this->getChildHtml('image_button'); 00106 }
getJsObjectName | ( | ) |
Retrive uploader js object name
Definition at line 123 of file Editor.php.
00124 { 00125 return $this->getHtmlId() . 'JsObject'; 00126 }
getResizeButtonHtml | ( | ) |
Definition at line 113 of file Editor.php.
00114 { 00115 return $this->getChildHtml('resize_button'); 00116 }
getRotateccwButtonHtml | ( | ) |
Definition at line 108 of file Editor.php.
00109 { 00110 return $this->getChildHtml('rotateccw_button'); 00111 }
getRotatecwButtonHtml | ( | ) |
Definition at line 98 of file Editor.php.
00099 { 00100 return $this->getChildHtml('rotatecw_button'); 00101 }
$_config [protected] |
Definition at line 38 of file Editor.php.