manufacturer_seo.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class Manufacturer_Seo extends Object_Seo
00007 {
00013     public function render()
00014     {
00015         $this->_aViewData['blShowSuffixEdit'] = true;
00016         $this->_aViewData['blShowSuffix'] = $this->_getObject( oxConfig::getParameter( 'oxid' ) )->oxmanufacturers__oxshowsuffix->value;
00017 
00018         return parent::render();
00019     }
00020 
00030     protected function _getSeoDataSql( $oObject, $iShopId, $iLang )
00031     {
00032         return parent::_getSeoDataSql( $oObject, $iShopId, $iLang )." and oxparams = '' ";
00033     }
00034 
00042     protected function _getSeoUrl( $oManufacturer )
00043     {
00044         $this->_getEncoder()->getManufacturerUrl( $oManufacturer );
00045         return parent::_getSeoUrl( $oManufacturer );
00046     }
00047 
00053     protected function _getType()
00054     {
00055         return 'oxmanufacturer';
00056     }
00057 
00063     public function save()
00064     {
00065         if ( $sOxid = oxConfig::getParameter( 'oxid' ) ) {
00066             $oManufacturer = oxNew( 'oxbase' );
00067             $oManufacturer->init( 'oxmanufacturers' );
00068             if ( $oManufacturer->load( $sOxid ) ) {
00069                 $oManufacturer->oxmanufacturers__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
00070                 $oManufacturer->save();
00071             }
00072         }
00073 
00074         return parent::save();
00075     }
00076 
00082     protected function _getEncoder()
00083     {
00084         return oxSeoEncoderManufacturer::getInstance();
00085     }
00086 }