Mage_Catalog_Model_Product_Attribute_Backend_Urlkey Class Reference

Inheritance diagram for Mage_Catalog_Model_Product_Attribute_Backend_Urlkey:

Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 beforeSave ($object)
 afterSave ($object)


Detailed Description

Definition at line 35 of file Urlkey.php.


Member Function Documentation

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     }


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

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