src/ShopBundle/objects/db/TShopArticle.class.php
public function GetSeoPattern(&$sPaternIn)
    {
        //$sPaternIn = "[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]"; //default
        $aPatRepl = null;

        if (!empty($this->sqlData['seo_pattern'])) {
            $sPaternIn = $this->sqlData['seo_pattern'];
        }

        $aPatRepl = array();
        $activePage = $this->getActivePageService()->getActivePage();
        $aPatRepl['PORTAL_NAME'] = $activePage->GetPortal()->GetTitle();

        $activeCategory = $this->getShopService()->getActiveCategory();
        if (is_object($activeCategory)) {
            $aPatRepl['CATEGORY_NAME'] = $activeCategory->GetName();
        }

        $oManufacturer = $this->GetFieldShopManufacturer();
        if (is_object($oManufacturer)) {
            $aPatRepl['MANUFACTURER_NAME'] = $oManufacturer->GetName();
        }

        $aPatRepl['ARTICLE_NAME'] = $this->GetName();

        return $aPatRepl;
    }
public function GetSeoPattern(&$sPaternIn)
    {
        //$sPaternIn = "[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]"; //default
        $aPatRepl = null;

        if (!empty($this->sqlData['seo_pattern'])) {
            $sPaternIn = $this->sqlData['seo_pattern'];
        }

        $aPatRepl = array();
        $activePage = $this->getActivePageService()->getActivePage();
        $aPatRepl['PORTAL_NAME'] = $activePage->GetPortal()->GetTitle();

        $activeCategory = $this->getShopService()->getActiveCategory();
        if (is_object($activeCategory)) {
            $aPatRepl['CATEGORY_NAME'] = $activeCategory->GetName();
        }

        $oManufacturer = $this->GetFieldShopManufacturer();
        if (is_object($oManufacturer)) {
            $aPatRepl['MANUFACTURER_NAME'] = $oManufacturer->GetName();
        }

        $aPatRepl['ARTICLE_NAME'] = $this->GetName();

        return $aPatRepl;
    }
public function GetSeoPattern ( & $ sPaternIn ) { //$sPaternIn = "[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]"; //default $ aPatRepl = null ; if ( ! empty ( $ this -> sqlData [ 'seo_pattern' ] ) ) { $ sPaternIn = $ this -> sqlData [ 'seo_pattern' ] ; } $ aPatRepl = array ( ) ; $ activePage = $ this -> getActivePageService ( ) -> getActivePage ( ) ; $ aPatRepl [ 'PORTAL_NAME' ] = $ activePage -> GetPortal ( ) -> GetTitle ( ) ; $ activeCategory = $ this -> getShopService ( ) -> getActiveCategory ( ) ; if ( is_object ( $ activeCategory ) ) { $ aPatRepl [ 'CATEGORY_NAME' ] = $ activeCategory -> GetName ( ) ; } $ oManufacturer = $ this -> GetFieldShopManufacturer ( ) ; if ( is_object ( $ oManufacturer ) ) { $ aPatRepl [ 'MANUFACTURER_NAME' ] = $ oManufacturer -> GetName ( ) ; } $ aPatRepl [ 'ARTICLE_NAME' ] = $ this -> GetName ( ) ; return $ aPatRepl ; }
Get SEO pattern of current article.

@param string $sPaternIn SEO pattern string

@return array SEO pattern replace values
Get SEO pattern of current article .