@@ 174-185 (lines=12) @@ | ||
171 | * |
|
172 | * @return Collection |
|
173 | */ |
|
174 | public function enabled() |
|
175 | { |
|
176 | $moduleCache = $this->getCache(); |
|
177 | ||
178 | $modules = $this->all()->map(function($item, $key) use ($moduleCache) { |
|
179 | $item['enabled'] = $moduleCache->get($item['slug']); |
|
180 | ||
181 | return $item; |
|
182 | }); |
|
183 | ||
184 | return $modules->where('enabled', true); |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * Get all disabled modules. |
|
@@ 192-203 (lines=12) @@ | ||
189 | * |
|
190 | * @return Collection |
|
191 | */ |
|
192 | public function disabled() |
|
193 | { |
|
194 | $moduleCache = $this->getCache(); |
|
195 | ||
196 | $modules = $this->all()->map(function($item, $key) use ($moduleCache) { |
|
197 | $item['enabled'] = $moduleCache->get($item['slug']); |
|
198 | ||
199 | return $item; |
|
200 | }); |
|
201 | ||
202 | return $modules->where('enabled', false); |
|
203 | } |
|
204 | ||
205 | /** |
|
206 | * Check if specified module is enabled. |