| Conditions | 3 |
| Paths | 3 |
| Total Lines | 32 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 21 | public static function create() |
||
| 22 | { |
||
| 23 | self::$urls = \Config::get('panel.panelControllers'); |
||
| 24 | |||
| 25 | $config = \Serverfireteam\Panel\Link::allCached(); |
||
| 26 | $dashboard = array(); |
||
| 27 | |||
| 28 | $appHelper = new AppHelper(); |
||
| 29 | |||
| 30 | // Make Dashboard Items |
||
| 31 | foreach ($config as $value) { |
||
| 32 | |||
| 33 | $modelName = $value['url']; |
||
| 34 | |||
| 35 | if ( in_array($modelName, self::$urls)) { |
||
| 36 | $model = "Serverfireteam\\Panel\\".$modelName; |
||
| 37 | } else { |
||
| 38 | $model = $appHelper->getNameSpace() . $modelName; |
||
| 39 | } |
||
| 40 | |||
| 41 | //if (class_exists($value)) { |
||
| 42 | $dashboard[] = array( |
||
| 43 | 'modelName' => $modelName, |
||
| 44 | 'title' => $value['display'], |
||
| 45 | 'count' => $model::count(), |
||
| 46 | 'showListUrl' => 'panel/' . $modelName . '/all', |
||
| 47 | 'addUrl' => 'panel/' . $modelName . '/edit', |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $dashboard; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |