OXID eShop CE  4.8.12
 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 {
13  public function save()
14  {
15  $oVendor = oxNew( 'oxbase' );
16  $oVendor->init( 'oxvendor' );
17  if ( $oVendor->load( $this->getEditObjectId() ) ) {
18  $oVendor->oxvendor__oxshowsuffix = new oxField( (int) oxConfig::getParameter( 'blShowSuffix' ) );
19  $oVendor->save();
20  }
21 
22  return parent::save();
23  }
24 
30  protected function _getEncoder()
31  {
32  return oxRegistry::get("oxSeoEncoderVendor");
33  }
34 
40  public function isSuffixSupported()
41  {
42  return true;
43  }
44 
50  public function isEntrySuffixed()
51  {
52  $oVendor = oxNew( 'oxvendor' );
53  if ( $oVendor->load( $this->getEditObjectId() ) ) {
54  return (bool) $oVendor->oxvendor__oxshowsuffix->value;
55  }
56  }
57 
63  protected function _getType()
64  {
65  return 'oxvendor';
66  }
67 
73  public function getEntryUri()
74  {
75  $oVendor = oxNew( 'oxvendor' );
76  if ( $oVendor->load( $this->getEditObjectId() ) ) {
77  return $this->_getEncoder()->getVendorUri( $oVendor, $this->getEditLang() );
78  }
79  }
80 }