Commit 7454e6d6 authored by Nicolas Widart's avatar Nicolas Widart

Update to conform to the new pingpong/Modules package

parent 28790d59
<?php namespace Modules\Media\Image; <?php namespace Modules\Media\Image;
use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Config\Repository;
use Pingpong\Modules\Repository as Module;
class ThumbnailsManager class ThumbnailsManager
{ {
...@@ -16,11 +15,10 @@ class ThumbnailsManager ...@@ -16,11 +15,10 @@ class ThumbnailsManager
/** /**
* @param Repository $config * @param Repository $config
* @param Module $module
*/ */
public function __construct(Repository $config, Module $module) public function __construct(Repository $config)
{ {
$this->module = $module; $this->module = app('modules');
$this->config = $config; $this->config = $config;
} }
...@@ -32,7 +30,7 @@ class ThumbnailsManager ...@@ -32,7 +30,7 @@ class ThumbnailsManager
{ {
$thumbnails = []; $thumbnails = [];
foreach ($this->module->enabled() as $enabledModule) { foreach ($this->module->enabled() as $enabledModule) {
$configuration = $this->config->get(strtolower($enabledModule) . '::thumbnails'); $configuration = $this->config->get(strtolower($enabledModule->getName()) . '::thumbnails');
$thumbnails = array_merge($thumbnails, $configuration); $thumbnails = array_merge($thumbnails, $configuration);
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>{{ trans('media::media.file picker') }}</title> <title>{{ trans('media::media.file picker') }}</title>
<link href="{!! Module::asset('core', 'css/vendor/bootstrap.min.css') !!}" rel="stylesheet" type="text/css" /> <link href="{!! Module::asset('core:css/vendor/bootstrap.min.css') !!}" rel="stylesheet" type="text/css" />
<script src="{!! Module::asset('core', 'js/vendor/jquery.min.js') !!}"></script> <script src="{!! Module::asset('core:js/vendor/jquery.min.js') !!}"></script>
<style> <style>
</style> </style>
</head> </head>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
@stop @stop
@section('styles') @section('styles')
<link href="{!! Module::asset('media', 'css/dropzone.css') !!}" rel="stylesheet" type="text/css" /> <link href="{!! Module::asset('media:css/dropzone.css') !!}" rel="stylesheet" type="text/css" />
<style> <style>
.dropzone { .dropzone {
border: 1px dashed #CCC; border: 1px dashed #CCC;
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
@stop @stop
@section('scripts') @section('scripts')
<script src="{!! Module::asset('media', 'js/dropzone.js') !!}"></script> <script src="{!! Module::asset('media:js/dropzone.js') !!}"></script>
<script> <script>
$( document ).ready(function() { $( document ).ready(function() {
Dropzone.autoDiscover = false; Dropzone.autoDiscover = false;
...@@ -147,7 +147,7 @@ $( document ).ready(function() { ...@@ -147,7 +147,7 @@ $( document ).ready(function() {
"bInfo": true, "bInfo": true,
"bAutoWidth": true, "bAutoWidth": true,
"oLanguage": { "oLanguage": {
"sUrl": '<?php echo Module::asset('core', "js/vendor/datatables/{$locale}.json") ?>' "sUrl": '<?php echo Module::asset("core:js/vendor/datatables/{$locale}.json") ?>'
}, },
"aoColumns": [ "aoColumns": [
null, null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment