OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
manufacturer_seo.php
Go to the documentation of this file.
1 <?php
2 
7 {
13  public function save()
14  {
15  $oManufacturer = oxNew( 'oxbase' );
16  $oManufacturer->init( 'oxmanufacturers' );
17  if ( $oManufacturer->load( $this->getEditObjectId() ) ) {
18  $oManufacturer->oxmanufacturers__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
19  $oManufacturer->save();
20  }
21 
22  return parent::save();
23  }
24 
30  protected function _getEncoder()
31  {
32  return oxRegistry::get("oxSeoEncoderManufacturer");
33  }
34 
40  public function isSuffixSupported()
41  {
42  return true;
43  }
44 
50  protected function _getType()
51  {
52  return 'oxmanufacturer';
53  }
54 
60  public function isEntrySuffixed()
61  {
62  $oManufacturer = oxNew( 'oxmanufacturer' );
63  if ( $oManufacturer->load( $this->getEditObjectId() ) ) {
64  return (bool) $oManufacturer->oxmanufacturers__oxshowsuffix->value;
65  }
66  }
67 
73  public function getEntryUri()
74  {
75  $oManufacturer = oxNew( 'oxmanufacturer' );
76  if ( $oManufacturer->load( $this->getEditObjectId() ) ) {
77  return $this->_getEncoder()->getManufacturerUri( $oManufacturer, $this->getEditLang() );
78  }
79  }
80 }