示例#1
0
 protected function get_entries()
 {
     $indexed_entries = array();
     $i = 0;
     foreach (parent::get_entries() as $entry) {
         $indexed_entries[$i++] = $entry;
     }
     return $indexed_entries;
 }
示例#2
0
 /**
  * The title and the category of the entries (descriptors) are translated and stored under
  * `__i18n_title` and `__i18n_category` respectively. The entries (descriptors) are ordered
  * according to their translated title.
  */
 protected function get_entries()
 {
     $entries = parent::get_entries();
     foreach ($entries as &$descriptor) {
         $descriptor['__i18n_title'] = self::resolve_module_title($descriptor[Module::T_ID]);
         $descriptor['__i18n_category'] = self::translate_module_category($descriptor);
     }
     unset($descriptor);
     usort($entries, function ($a, $b) {
         return \ICanBoogie\unaccent_compare_ci($a['__i18n_title'], $b['__i18n_title']);
     });
     return $entries;
 }