vendor_seo.php

Go to the documentation of this file.
00001 <?php
00002 
00006 class Vendor_Seo extends Object_Seo
00007 {
00008     public function render()
00009     {
00010         $this->_aViewData['blShowSuffixEdit'] = true;
00011         $this->_aViewData['blShowSuffix'] = $this->_getObject( oxConfig::getParameter( 'oxid' ) )->oxvendor__oxshowsuffix->value;
00012 
00013         return parent::render();
00014     }
00015 
00025     protected function _getSeoDataSql( $oObject, $iShopId, $iLang )
00026     {
00027         return parent::_getSeoDataSql( $oObject, $iShopId, $iLang )." and oxparams = '' ";
00028     }
00029 
00037     protected function _getSeoUrl( $oVendor )
00038     {
00039         oxSeoEncoderVendor::getInstance()->getVendorUrl( $oVendor );
00040         return parent::_getSeoUrl( $oVendor );
00041     }
00042 
00048     protected function _getObject( $sOxid )
00049     {
00050         // load object
00051         $oVendor = oxNew( 'oxvendor' );
00052         if ( $oVendor->loadInLang( $this->_iEditLang, $sOxid ) ) {
00053             return $oVendor;
00054         }
00055     }
00056 
00062     protected function _getType()
00063     {
00064         return 'oxvendor';
00065     }
00066 
00072     protected function _getStdUrl( $sOxid )
00073     {
00074         $oVendor = oxNew( 'oxvendor' );
00075         $oVendor->loadInLang( $this->_iEditLang, $sOxid );
00076         return $oVendor->getLink();
00077     }
00078 
00084     public function save()
00085     {
00086         if ( $sOxid = oxConfig::getParameter( 'oxid' ) ) {
00087             $oVendor = oxNew( 'oxbase' );
00088             $oVendor->init( 'oxvendor' );
00089             if ( $oVendor->load( $sOxid ) ) {
00090                 $oVendor->oxvendor__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
00091                 $oVendor->save();
00092 
00093                 // marking page links as expired
00094                 oxSeoEncoderVendor::getInstance()->markAsExpired( $sOxid, oxConfig::getInstance()->getShopId(), $this->_iEditLang, "oxparams != '' " );
00095             }
00096         }
00097 
00098         return parent::save();
00099     }
00100 }

Generated on Thu Dec 4 12:04:56 2008 for OXID eShop CE by  doxygen 1.5.5