OXID eShop CE  4.9.5
 All Classes Files Functions Variables Pages
vendor_seo.php
Go to the documentation of this file.
1 <?php
2 
6 class Vendor_Seo extends Object_Seo
7 {
8 
14  public function save()
15  {
16  $oVendor = oxNew('oxbase');
17  $oVendor->init('oxvendor');
18  if ($oVendor->load($this->getEditObjectId())) {
19  $sShowSuffixField = 'oxvendor__oxshowsuffix';
20  $blShowSuffixParameter = oxRegistry::getConfig()->getRequestParameter('blShowSuffix');
21  $oVendor->$sShowSuffixField = new oxField((int) $blShowSuffixParameter);
22  $oVendor->save();
23  }
24 
25  return parent::save();
26  }
27 
33  protected function _getEncoder()
34  {
35  return oxRegistry::get("oxSeoEncoderVendor");
36  }
37 
43  public function isSuffixSupported()
44  {
45  return true;
46  }
47 
53  public function isEntrySuffixed()
54  {
55  $oVendor = oxNew('oxvendor');
56  if ($oVendor->load($this->getEditObjectId())) {
57  return (bool) $oVendor->oxvendor__oxshowsuffix->value;
58  }
59  }
60 
66  protected function _getType()
67  {
68  return 'oxvendor';
69  }
70 
76  public function getEntryUri()
77  {
78  $oVendor = oxNew('oxvendor');
79  if ($oVendor->load($this->getEditObjectId())) {
80  return $this->_getEncoder()->getVendorUri($oVendor, $this->getEditLang());
81  }
82  }
83 }