Public Member Functions | |
getElementHtml () | |
getContentHtml () | |
getLabel () | |
canDisplayUseDefault ($attribute) | |
usedDefault ($attribute) | |
getScopeLabel ($attribute) | |
getDataObject () | |
getAttributeFieldName ($attribute) | |
getAttributeReadonly ($attribute) | |
toHtml () |
Definition at line 35 of file Gallery.php.
canDisplayUseDefault | ( | $ | attribute | ) |
Check "Use default" checkbox display availability
Mage_Eav_Model_Entity_Attribute | $attribute |
Definition at line 73 of file Gallery.php.
00074 { 00075 if (!$attribute->isScopeGlobal() && $this->getDataObject()->getStoreId()) { 00076 return true; 00077 } 00078 00079 return false; 00080 }
getAttributeFieldName | ( | $ | attribute | ) |
Retrieve attribute field name
Mage_Eav_Model_Entity_Attribute | $attribute |
Definition at line 138 of file Gallery.php.
00139 { 00140 $name = $attribute->getAttributeCode(); 00141 if ($suffix = $this->getForm()->getFieldNameSuffix()) { 00142 $name = $this->getForm()->addSuffixToName($name, $suffix); 00143 } 00144 return $name; 00145 }
getAttributeReadonly | ( | $ | attribute | ) |
Check readonly attribute
Mage_Eav_Model_Entity_Attribute|string | $attribute |
Definition at line 153 of file Gallery.php.
00154 { 00155 if (is_object($attribute)) { 00156 $attribute = $attribute->getAttributeCode(); 00157 } 00158 00159 if ($this->getDataObject()->isLockedAttribute($attribute)) { 00160 return true; 00161 } 00162 00163 return false; 00164 }
getContentHtml | ( | ) |
Prepares content block
Definition at line 50 of file Gallery.php.
00051 { 00052 00053 /* @var $content Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery_Content */ 00054 $content = Mage::getSingleton('core/layout') 00055 ->createBlock('adminhtml/catalog_product_helper_form_gallery_content'); 00056 00057 $content->setId($this->getHtmlId() . '_content') 00058 ->setElement($this); 00059 return $content->toHtml(); 00060 }
getDataObject | ( | ) |
Retrieve data object related with form
Definition at line 126 of file Gallery.php.
00127 { 00128 return $this->getForm()->getDataObject(); 00129 }
getElementHtml | ( | ) |
Reimplemented from Varien_Data_Form_Element_Abstract.
Definition at line 38 of file Gallery.php.
00039 { 00040 $html = $this->getContentHtml(); 00041 //$html.= $this->getAfterElementHtml(); 00042 return $html; 00043 }
getLabel | ( | ) |
getScopeLabel | ( | $ | attribute | ) |
Retrieve label of attribute scope
GLOBAL | WEBSITE | STORE
Mage_Eav_Model_Entity_Attribute | $attribute |
Definition at line 102 of file Gallery.php.
00103 { 00104 $html = ''; 00105 if (Mage::app()->isSingleStoreMode()) { 00106 return $html; 00107 } 00108 00109 if ($attribute->isScopeGlobal()) { 00110 $html.= '<br/>[GLOBAL]'; 00111 } 00112 elseif ($attribute->isScopeWebsite()) { 00113 $html.= '<br/>[WEBSITE]'; 00114 } 00115 elseif ($attribute->isScopeStore()) { 00116 $html.= '<br/>[STORE VIEW]'; 00117 } 00118 return $html; 00119 }
toHtml | ( | ) |
Reimplemented from Varien_Data_Form_Element_Abstract.
Definition at line 166 of file Gallery.php.
00167 { 00168 return '<tr><td class="value" colspan="3">' . $this->getElementHtml() . '</td></tr>'; 00169 }
usedDefault | ( | $ | attribute | ) |
Check default value usage fact
Mage_Eav_Model_Entity_Attribute | $attribute |
Definition at line 88 of file Gallery.php.
00089 { 00090 $devaultValue = $this->getDataObject()->getAttributeDefaultValue($attribute->getAttributeCode()); 00091 return is_null($devaultValue); 00092 }