src/ShopBundle/objects/db/TShopArticle.class.php
public function IsInArticleGroups($aGroupList)
    {
        $bIsInGroups = false;
        $aArticleGroups = $this->GetMLTIdList('shop_article_group');
        $aIntersec = array_intersect($aArticleGroups, $aGroupList);

        if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) {
            $oParent = &$this->GetFieldVariantParent();
            if ($oParent) {
                $bIsInGroups = $oParent->IsInArticleGroups($aGroupList);
            }
        } else {
            $bIsInGroups = (count($aIntersec) > 0);
        }

        return $bIsInGroups;
    }
public function IsInArticleGroups($aGroupList)
    {
        $bIsInGroups = false;
        $aArticleGroups = $this->GetMLTIdList('shop_article_group');
        $aIntersec = array_intersect($aArticleGroups, $aGroupList);

        if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) {
            $oParent = &$this->GetFieldVariantParent();
            if ($oParent) {
                $bIsInGroups = $oParent->IsInArticleGroups($aGroupList);
            }
        } else {
            $bIsInGroups = (count($aIntersec) > 0);
        }

        return $bIsInGroups;
    }
public function IsInArticleGroups ( $ aGroupList ) { $ bIsInGroups = false ; $ aArticleGroups = $ this -> GetMLTIdList ( 'shop_article_group' ) ; $ aIntersec = array_intersect ( $ aArticleGroups , $ aGroupList ) ; if ( 0 == count ( $ aIntersec ) && 0 == count ( $ aArticleGroups ) && $ this -> IsVariant ( ) ) { $ oParent = & $ this -> GetFieldVariantParent ( ) ; if ( $ oParent ) { $ bIsInGroups = $ oParent -> IsInArticleGroups ( $ aGroupList ) ; } } else { $ bIsInGroups = ( count ( $ aIntersec ) > 0 ) ; } return $ bIsInGroups ; }
return true if the article is in at least one of the groups.

@param array $aGroupList

@return bool
return true if the article is in at least one of the groups .