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