protected function getOptions(array $options)
    {
        $labels = [];
        if ($this->hasLanguages()) {
            // As this point we are construction the options for multiple languages
            foreach ($this->languages as $language) {
                foreach ($options as $key => $option) {
                    $labels[$language][$key] = Helpers::convertNameToLabel($option);
                }
            }
        } else {

            // At this point we are just formatting the labels
            foreach ($options as $key => $option) {
                $labels[$key] = Helpers::convertNameToLabel($option);
            }
        }

        return $labels;
    }
protected function getOptions(array $options)
    {
        $labels = [];
        if ($this->hasLanguages()) {
            // As this point we are construction the options for multiple languages
            foreach ($this->languages as $language) {
                foreach ($options as $key => $option) {
                    $labels[$language][$key] = Helpers::convertNameToLabel($option);
                }
            }
        } else {

            // At this point we are just formatting the labels
            foreach ($options as $key => $option) {
                $labels[$key] = Helpers::convertNameToLabel($option);
            }
        }

        return $labels;
    }
protected function getOptions ( array $ options ) { $ labels = [ ] ; if ( $ this -> hasLanguages ( ) ) { // As this point we are construction the options for multiple languages foreach ( $ this -> languages as $ language ) { foreach ( $ options as $ key => $ option ) { $ labels [ $ language ] [ $ key ] = Helpers :: convertNameToLabel ( $ option ) ; } } } else { // At this point we are just formatting the labels foreach ( $ options as $ key => $ option ) { $ labels [ $ key ] = Helpers :: convertNameToLabel ( $ option ) ; } } return $ labels ; }
Gets options from a given array of options

@param string $name

@return mix (string|array)
Gets options from a given array of options