protected function getLabelsFromArray(array $items)
    {
        $labels = [];

        foreach ($items as $key => $label) {
            $lang = empty($key) || is_numeric($key) ? $this->defaultLang : $key;
            $labels[] = new Label($label, $this->localeGroup, false, $lang);
        }

        return $labels;
    }
protected function getLabelsFromArray(array $items)
    {
        $labels = [];

        foreach ($items as $key => $label) {
            $lang = empty($key) || is_numeric($key) ? $this->defaultLang : $key;
            $labels[] = new Label($label, $this->localeGroup, false, $lang);
        }

        return $labels;
    }
protected function getLabelsFromArray ( array $ items ) { $ labels = [ ] ; foreach ( $ items as $ key => $ label ) { $ lang = empty ( $ key ) || is_numeric ( $ key ) ? $ this -> defaultLang : $ key ; $ labels [ ] = new Label ( $ label , $ this -> localeGroup , false , $ lang ) ; } return $ labels ; }
It get the labels from a given array

@param array $items

@return $this
It get the labels from a given array