Beispiel #1
0
 public static function get($name = null, $default = null)
 {
     $instance = static::getInstance();
     if ($name === null) {
         return $instance->_data;
     } else {
         $data = Hash::get($instance->_data, $name);
         if ($data !== null) {
             return $data;
         }
         return $default;
     }
 }
Beispiel #2
0
 public function service($template, $root, $data = [])
 {
     $account = \Mithos\Account\Auth::getAccount();
     if ($account !== null) {
         $avaliables = Hash::nest($account->getAvaliableServices());
         $services = [];
         foreach ($avaliables as $avaliable) {
             if ($avaliable['service'] == $root) {
                 $services = $avaliable['children'];
             }
         }
         return View::display('panel/view', ['service' => View::fetch($template, array_merge(['layout' => false], $data)), 'account' => \Mithos\Account\Auth::getAccount(), 'services' => $services]);
     }
 }
Beispiel #3
0
 public function getFormattedItems()
 {
     $items = Hash::sort($this->_items, '{s}.sequence', 'asc');
     return Hash::nest($items);
 }