Public Member Functions | |
beforeSave ($object) | |
afterSave ($object) |
Definition at line 35 of file Urlkey.php.
afterSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 51 of file Urlkey.php.
00052 { 00053 /* @var $object Mage_Catalog_Model_Product */ 00054 if (!$object->getExcludeUrlRewrite() && 00055 ($object->dataHasChangedFor('url_key') || $object->getIsChangedCategories() || $object->getIsChangedWebsites())) { 00056 Mage::getSingleton('catalog/url')->refreshProductRewrite($object->getId()); 00057 } 00058 return $this; 00059 }
beforeSave | ( | $ | object | ) |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.
Definition at line 37 of file Urlkey.php.
00038 { 00039 $attributeName = $this->getAttribute()->getName(); 00040 00041 $urlKey = $object->getData($attributeName); 00042 if ($urlKey == '') { 00043 $urlKey = $object->getName(); 00044 } 00045 00046 $object->setData($attributeName, $object->formatUrlKey($urlKey)); 00047 00048 return $this; 00049 }