category_seo.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class Category_Seo extends Object_Seo
00007 {
00014     public function render()
00015     {
00016         $oCategory = $this->_getObject( oxConfig::getParameter( 'oxid' ) );
00017 
00018 
00019         $this->_aViewData["edit"] = $oCategory;
00020         $this->_aViewData['blShowSuffixEdit'] = true;
00021         $this->_aViewData['blShowSuffix'] = $oCategory ? $oCategory->oxcategories__oxshowsuffix->value : false;
00022 
00023         return parent::render();
00024     }
00025 
00035     protected function _getSeoDataSql( $oObject, $iShopId, $iLang )
00036     {
00037         return parent::_getSeoDataSql( $oObject, $iShopId, $iLang )." and oxparams = '' ";
00038     }
00039 
00047     protected function _getSeoUrl( $oCategory )
00048     {
00049         oxSeoEncoderCategory::getInstance()->getCategoryUrl( $oCategory );
00050 
00051         return parent::_getSeoUrl( $oCategory );
00052     }
00053 
00059     protected function _getType()
00060     {
00061         return 'oxcategory';
00062     }
00063 
00069     public function save()
00070     {
00071         if ( $sOxid = oxConfig::getParameter( 'oxid' ) ) {
00072             $oCategory = oxNew( 'oxbase' );
00073             $oCategory->init( 'oxcategories' );
00074             if ( $oCategory->load( $sOxid ) ) {
00075                 $oCategory->oxcategories__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
00076                 $oCategory->save();
00077 
00078                 oxSeoEncoderCategory::getInstance()->markRelatedAsExpired( $oCategory );
00079             }
00080         }
00081 
00082         return parent::save();
00083     }
00084 }

Generated by  doxygen 1.6.2