コード例 #1
0
ファイル: numbermanager.php プロジェクト: swk/bluebox
 public function numberContexts()
 {
     $subview = new View('numbermanager/numberContexts');
     $subview->tab = 'main';
     $subview->section = 'number_contexts';
     $contexts = numbermanager::getContexts($this->number);
     $subview->contexts = array();
     foreach ($contexts['contexts'] as $key => $context) {
         $subview->contexts[$context['context_id']] = $context['name'];
     }
     $this->views[] = $subview;
 }
コード例 #2
0
ファイル: numbermanager.php プロジェクト: swk/bluebox
 public function numberContexts()
 {
     $subview = new View('numbermanager/numberContexts');
     $subview->tab = 'main';
     $subview->section = 'number_contexts';
     $order = array();
     foreach ($this->number['NumberContext'] as $key => $context) {
         $order[$context['context_id']] = $key;
     }
     $contexts = numbermanager::getContexts($this->number);
     $subview->contexts = array();
     foreach ($contexts['contexts'] as $key => $context) {
         $subview->contexts[$context['context_id']] = $context['name'];
         if (isset($order[$context['context_id']])) {
             continue;
         }
         $order[$context['context_id']] = count($order);
     }
     $subview->order = $order;
     $this->views[] = $subview;
 }