1 | <?php namespace Mascame\Artificer; |
||
9 | class Artificer |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * Returns the current user's action. |
||
14 | * |
||
15 | * @return null|string |
||
16 | */ |
||
17 | public static function getCurrentAction() |
||
33 | |||
34 | /** |
||
35 | * @return Model |
||
36 | */ |
||
37 | public static function getModel() |
||
41 | |||
42 | /** |
||
43 | * @return \Mascame\Artificer\Plugin\Manager |
||
44 | */ |
||
45 | public static function pluginManager() |
||
49 | |||
50 | /** |
||
51 | * @return \Mascame\Artificer\Widget\Manager |
||
52 | */ |
||
53 | public static function widgetManager() |
||
57 | |||
58 | public static function assets() |
||
68 | |||
69 | public static function getCurrentModelId($items) |
||
73 | |||
74 | |||
75 | public static function addMenu($options) |
||
79 | |||
80 | protected static function getMenu() |
||
84 | |||
85 | protected static function getProviders() |
||
89 | |||
90 | /** |
||
91 | * Use it only for third party Service Providers |
||
92 | * (Your main Service provider must be already declared for this to work) |
||
93 | * |
||
94 | * @param $provider |
||
95 | * @return mixed |
||
96 | */ |
||
97 | public static function addServiceProvider($provider) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * @param $plugin |
||
105 | * @return mixed |
||
106 | */ |
||
107 | // public static function getPlugin($plugin) |
||
108 | // { |
||
109 | // return with(App::make('ArtificerPluginManager'))->make($plugin); |
||
110 | // } |
||
111 | |||
112 | // Todo is it used anywhere? |
||
113 | // public static function store($filepath = null, $content, $overide = false) |
||
114 | // { |
||
115 | // if (!$filepath) { |
||
116 | // $pathinfo = pathinfo($filepath); |
||
117 | // $filepath = $pathinfo['dirname']; |
||
118 | // } |
||
119 | // |
||
120 | // $path = explode('/', $filepath); |
||
121 | // array_pop($path); |
||
122 | // $path = join('/', $path); |
||
123 | // |
||
124 | // if (!file_exists($path)) { |
||
125 | // \File::makeDirectory($path, 0777, true, true); |
||
126 | // } |
||
127 | // |
||
128 | // if (!file_exists($filepath) || $overide) { |
||
129 | // return \File::put($filepath, $content); |
||
130 | // } |
||
131 | // |
||
132 | // return false; |
||
133 | // } |
||
134 | } |