manufacturer_seo.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class Manufacturer_Seo extends Object_Seo
00007 {
00008 
00014     public function save()
00015     {
00016         $oManufacturer = oxNew('oxbase');
00017         $oManufacturer->init('oxmanufacturers');
00018         if ($oManufacturer->load($this->getEditObjectId())) {
00019             $sShowSuffixField = 'oxmanufacturers__oxshowsuffix';
00020             $blShowSuffixParameter = oxRegistry::getConfig()->getRequestParameter('blShowSuffix');
00021             $oManufacturer->$sShowSuffixField = new oxField((int) $blShowSuffixParameter);
00022             $oManufacturer->save();
00023         }
00024 
00025         return parent::save();
00026     }
00027 
00033     protected function _getEncoder()
00034     {
00035         return oxRegistry::get("oxSeoEncoderManufacturer");
00036     }
00037 
00043     public function isSuffixSupported()
00044     {
00045         return true;
00046     }
00047 
00053     protected function _getType()
00054     {
00055         return 'oxmanufacturer';
00056     }
00057 
00063     public function isEntrySuffixed()
00064     {
00065         $oManufacturer = oxNew('oxmanufacturer');
00066         if ($oManufacturer->load($this->getEditObjectId())) {
00067             return (bool) $oManufacturer->oxmanufacturers__oxshowsuffix->value;
00068         }
00069     }
00070 
00076     public function getEntryUri()
00077     {
00078         $oManufacturer = oxNew('oxmanufacturer');
00079         if ($oManufacturer->load($this->getEditObjectId())) {
00080             return $this->_getEncoder()->getManufacturerUri($oManufacturer, $this->getEditLang());
00081         }
00082     }
00083 }