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