BxDolJoinProcessor::getCoupleOptions PHP Method

getCoupleOptions() public method

public getCoupleOptions ( )
    function getCoupleOptions()
    {
        //find Couple item (check if it is active)
        $aCoupleItem = false;
        foreach ($this->aPages as $iPageInd => $iPage) {
            //cycle pages
            $aBlocks = $this->oPF->aArea[$iPage];
            foreach ($aBlocks as $iBlockID => $aBlock) {
                //cycle blocks
                $aItems = $aBlock['Items'];
                foreach ($aItems as $iItemID => $aItem) {
                    //cycle items
                    if ($aItem['Name'] == 'Couple') {
                        // we found it!
                        $aCoupleItem = $aItem;
                        break;
                    }
                }
                if ($aCoupleItem) {
                    // we already found it
                    break;
                }
            }
            if ($aCoupleItem) {
                // we already found it
                break;
            }
        }
        if ($aCoupleItem) {
            $this->bCoupleEnabled = true;
            $this->bCouple = (isset($_REQUEST['Couple']) and $_REQUEST['Couple'] == 'yes') ? true : false;
        } else {
            $this->bCoupleEnabled = false;
            $this->bCouple = false;
        }
    }