src/ShopBundle/mappers/article/TPkgShopMapper_ArticleOtherCategoriesTeaser.class.php
protected function getLink(TdbShopCategory $oCategory, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $bLinkOnlyLastItem = false)
    {
        $aLinkParts = array();

        $oBreadcrumb = $oCategory->GetBreadcrumb();
        /** @var $oBreadcrumbItem TdbShopCategory */
        while ($oBreadcrumbItem = $oBreadcrumb->Next()) {
            if ($bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oBreadcrumbItem->table, $oBreadcrumbItem->id);
            }
            $aLinkData = array(
                'sName' => $oBreadcrumbItem->GetName(),
                'sLink' => '',
            );

            if (false === $bLinkOnlyLastItem || (true === $bLinkOnlyLastItem && $oBreadcrumb->IsLast())) {
                $aLinkData['sLink'] = $oBreadcrumbItem->GetLink();
            }
            $aLinkParts[] = $aLinkData;
        }

        return $aLinkParts;
    }
protected function getLink(TdbShopCategory $oCategory, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $bLinkOnlyLastItem = false)
    {
        $aLinkParts = array();

        $oBreadcrumb = $oCategory->GetBreadcrumb();
        /** @var $oBreadcrumbItem TdbShopCategory */
        while ($oBreadcrumbItem = $oBreadcrumb->Next()) {
            if ($bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oBreadcrumbItem->table, $oBreadcrumbItem->id);
            }
            $aLinkData = array(
                'sName' => $oBreadcrumbItem->GetName(),
                'sLink' => '',
            );

            if (false === $bLinkOnlyLastItem || (true === $bLinkOnlyLastItem && $oBreadcrumb->IsLast())) {
                $aLinkData['sLink'] = $oBreadcrumbItem->GetLink();
            }
            $aLinkParts[] = $aLinkData;
        }

        return $aLinkParts;
    }
protected function getLink ( TdbShopCategory $ oCategory , IMapperCacheTriggerRestricted $ oCacheTriggerManager , $ bCachingEnabled , $ bLinkOnlyLastItem = false ) { $ aLinkParts = array ( ) ; $ oBreadcrumb = $ oCategory -> GetBreadcrumb ( ) ; /** @var $oBreadcrumbItem TdbShopCategory */ while ( $ oBreadcrumbItem = $ oBreadcrumb -> Next ( ) ) { if ( $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( $ oBreadcrumbItem -> table , $ oBreadcrumbItem -> id ) ; } $ aLinkData = array ( 'sName' => $ oBreadcrumbItem -> GetName ( ) , 'sLink' => '' , ) ; if ( false === $ bLinkOnlyLastItem || ( true === $ bLinkOnlyLastItem && $ oBreadcrumb -> IsLast ( ) ) ) { $ aLinkData [ 'sLink' ] = $ oBreadcrumbItem -> GetLink ( ) ; } $ aLinkParts [ ] = $ aLinkData ; } return $ aLinkParts ; }
converts the category into an array with link data.

@param TdbShopCategory               $oCategory
@param IMapperCacheTriggerRestricted $oCacheTriggerManager
@param bool                          $bCachingEnabled
@param bool                          $bLinkOnlyLastItem    set to true if only the last category should have a link set otherwise each item has a link set

@return array
converts the category into an array with link data .