protected function getAvailableOptions($scope, $searchQuery = null)
    {
        if ($scope->options) {
            return $this->getOptionsFromArray($scope, $searchQuery);
        }

        $available = [];
        $nameColumn = $this->getScopeNameFrom($scope);
        $options = $this->getOptionsFromModel($scope, $searchQuery);
        foreach ($options as $option) {
            $available[$option->getKey()] = $option->{$nameColumn};
        }

        return $available;
    }
protected function getAvailableOptions($scope, $searchQuery = null)
    {
        if ($scope->options) {
            return $this->getOptionsFromArray($scope, $searchQuery);
        }

        $available = [];
        $nameColumn = $this->getScopeNameFrom($scope);
        $options = $this->getOptionsFromModel($scope, $searchQuery);
        foreach ($options as $option) {
            $available[$option->getKey()] = $option->{$nameColumn};
        }

        return $available;
    }
protected function getAvailableOptions ( $ scope , $ searchQuery = null ) { if ( $ scope -> options ) { return $ this -> getOptionsFromArray ( $ scope , $ searchQuery ) ; } $ available = [ ] ; $ nameColumn = $ this -> getScopeNameFrom ( $ scope ) ; $ options = $ this -> getOptionsFromModel ( $ scope , $ searchQuery ) ; foreach ( $ options as $ option ) { $ available [ $ option -> getKey ( ) ] = $ option -> { $ nameColumn } ; } return $ available ; }
Returns the available options a scope can use, either from the
model relation or from a supplied array. Optionally apply a search
constraint to the options.
@param  string $scope
@param  string $searchQuery
@return array
Returns the available options a scope can use either from the model relation or from a supplied array . Optionally apply a search constraint to the options .