/** * Returns the remaining locales sorted by language name * * @return array */ public function getRemainingViews() { $remainingViews = parent::getRemainingViews(); usort($remainingViews, function (ChoiceView $choiceView1, ChoiceView $choiceView2) { return \Collator::create(null)->compare($choiceView1->label, $choiceView2->label); }); return $remainingViews; }
/** * {@inheritdoc} */ public function getChoices() { $choices = parent::getRemainingViews(); $array = array(); foreach ($choices as $choice) { $array[] = array('value' => $choice->value, 'label' => $choice->label); } return $array; }