protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
    {
        $active = [];
        foreach ($availableOptions as $id => $option) {
            if (!in_array($id, $activeKeys)) {
                continue;
            }

            $active[$id] = $option;
            unset($availableOptions[$id]);
        }

        return $active;
    }
protected function filterActiveOptions(array $activeKeys, array &$availableOptions)
    {
        $active = [];
        foreach ($availableOptions as $id => $option) {
            if (!in_array($id, $activeKeys)) {
                continue;
            }

            $active[$id] = $option;
            unset($availableOptions[$id]);
        }

        return $active;
    }
protected function filterActiveOptions ( array $ activeKeys , array & $ availableOptions ) { $ active = [ ] ; foreach ( $ availableOptions as $ id => $ option ) { if ( ! in_array ( $ id , $ activeKeys ) ) { continue ; } $ active [ $ id ] = $ option ; unset ( $ availableOptions [ $ id ] ) ; } return $ active ; }
Removes any already selected options from the available options, returns
a newly built array.
@param  array  $activeKeys
@param  array  $availableOptions
@return array
Removes any already selected options from the available options returns a newly built array .