/** * Singleton method * * @return oxSeoEncoderArticle */ public static function getInstance() { if (defined('OXID_PHP_UNIT')) { self::$_instance = modInstances::getMod(__CLASS__); } if (!self::$_instance) { self::$_instance = oxNew("oxSeoEncoderArticle"); if (defined('OXID_PHP_UNIT')) { modInstances::addMod(__CLASS__, self::$_instance); } } if (defined('OXID_PHP_UNIT')) { // resetting cache self::$_instance->_aSeoCache = array(); } return self::$_instance; }
/** * Returns raw recommlist seo url * * @param int $iLang language id * * @return string */ public function getBaseSeoLink($iLang) { return oxSeoEncoderArticle::getInstance()->getArticleUrl($this, $iLang, $iLinkType); }
/** * Returns raw article seo url * * @param int $iLang language id * @param bool $blMain force to return main url [optional] * * @return string */ public function getBaseSeoLink($iLang, $blMain = false) { $oEncoder = oxSeoEncoderArticle::getInstance(); if (!$blMain) { return $oEncoder->getArticleUrl($this, $iLang, $this->getLinkType()); } return $oEncoder->getArticleMainUrl($this, $iLang); }