コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function getChoices()
 {
     $choices = parent::getRemainingViews();
     $array = array();
     foreach ($choices as $choice) {
         $array[] = array('value' => $choice->value, 'label' => $choice->label);
     }
     return $array;
 }