public function getOptionsByLang($lang = 'en')
    {
        $finalOptions = [];

        foreach ($this->getOptions() as $options) {
            foreach ($options as $option) {
                if ($option->lang == $lang || $option->isPlain) {
                    $finalOptions[] = $option;
                }
            }
        }

        return empty($finalOptions) ? null : $finalOptions;
    }
public function getOptionsByLang($lang = 'en')
    {
        $finalOptions = [];

        foreach ($this->getOptions() as $options) {
            foreach ($options as $option) {
                if ($option->lang == $lang || $option->isPlain) {
                    $finalOptions[] = $option;
                }
            }
        }

        return empty($finalOptions) ? null : $finalOptions;
    }
public function getOptionsByLang ( $ lang = 'en' ) { $ finalOptions = [ ] ; foreach ( $ this -> getOptions ( ) as $ options ) { foreach ( $ options as $ option ) { if ( $ option -> lang == $ lang || $ option -> isPlain ) { $ finalOptions [ ] = $ option ; } } } return empty ( $ finalOptions ) ? null : $ finalOptions ; }
Gets a options by a given language

@param string $lang

@return object
Gets a options by a given language