Protected Member Functions | |
_beforeSave () |
Definition at line 28 of file Sitemap.php.
_beforeSave | ( | ) | [protected] |
Processing object before save data
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 31 of file Sitemap.php.
00032 { 00033 $value = $this->getValue(); 00034 if ($value < 0 || $value > 1) { 00035 throw new Exception(Mage::helper('sitemap')->__('Priority must be between 0 and 1')); 00036 } elseif (($value == 0) && !($value === '0' || $value === '0.0')) { 00037 throw new Exception(Mage::helper('sitemap')->__('Priority must be between 0 and 1')); 00038 } 00039 return $this; 00040 }