private static function checkCategoryMatch(&$currentMenuLinkIDs, $menuLink)
    {
        // check for category match
        if (Meta::getModelData()
            && isset($menuLink->params->categoryID)
            && isset(Meta::getModelData()->categories)
            && count(Meta::getModelData()->categories)
        ) {
            foreach(Meta::getModelData()->categories as $category){
                if($category->categoryID === $menuLink->params->categoryID) {
                    array_push($currentMenuLinkIDs, $menuLink->menuLinkID);

                    // append its parents too
                    foreach (self::parentID($menuLink->menuLinkID) as $parentID) {
                        array_push($currentMenuLinkIDs, $parentID);
                    }
                }
            }
        }

    }
private static function checkCategoryMatch(&$currentMenuLinkIDs, $menuLink)
    {
        // check for category match
        if (Meta::getModelData()
            && isset($menuLink->params->categoryID)
            && isset(Meta::getModelData()->categories)
            && count(Meta::getModelData()->categories)
        ) {
            foreach(Meta::getModelData()->categories as $category){
                if($category->categoryID === $menuLink->params->categoryID) {
                    array_push($currentMenuLinkIDs, $menuLink->menuLinkID);

                    // append its parents too
                    foreach (self::parentID($menuLink->menuLinkID) as $parentID) {
                        array_push($currentMenuLinkIDs, $parentID);
                    }
                }
            }
        }

    }
private static function checkCategoryMatch ( & $ currentMenuLinkIDs , $ menuLink ) { // check for category match if ( Meta :: getModelData ( ) && isset ( $ menuLink -> params -> categoryID ) && isset ( Meta :: getModelData ( ) -> categories ) && count ( Meta :: getModelData ( ) -> categories ) ) { foreach ( Meta :: getModelData ( ) -> categories as $ category ) { if ( $ category -> categoryID === $ menuLink -> params -> categoryID ) { array_push ( $ currentMenuLinkIDs , $ menuLink -> menuLinkID ) ; // append its parents too foreach ( self :: parentID ( $ menuLink -> menuLinkID ) as $ parentID ) { array_push ( $ currentMenuLinkIDs , $ parentID ) ; } } } } }
Check if the menulink has a category linked to currrent Meta model data

@param  array    $currentMenuLinkIDs
@param  $menuLink
@throws \Exception
Check if the menulink has a category linked to currrent Meta model data