Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
141a2950
Commit
141a2950
authored
Dec 08, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing media module
parent
923353a1
Changes
69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
0 additions
and
4308 deletions
+0
-4308
.sensiolabs.yml
Modules/Media/.sensiolabs.yml
+0
-3
.travis.yml
Modules/Media/.travis.yml
+0
-6
dropzone.css
Modules/Media/Assets/css/dropzone.css
+0
-397
spritemap.png
Modules/Media/Assets/images/spritemap.png
+0
-0
spritemap@2x.png
Modules/Media/Assets/images/spritemap@2x.png
+0
-0
dropzone.js
Modules/Media/Assets/js/dropzone.js
+0
-1873
SidebarViewComposer.php
Modules/Media/Composers/SidebarViewComposer.php
+0
-19
config.php
Modules/Media/Config/config.php
+0
-23
permissions.php
Modules/Media/Config/permissions.php
+0
-11
thumbnails.php
Modules/Media/Config/thumbnails.php
+0
-13
RefreshThumbnailCommand.php
Modules/Media/Console/RefreshThumbnailCommand.php
+0
-43
2014_10_26_162751_create_files_table.php
...abase/Migrations/2014_10_26_162751_create_files_table.php
+0
-38
2014_10_26_162811_create_file_translations_table.php
...ions/2014_10_26_162811_create_file_translations_table.php
+0
-40
MediaDatabaseSeeder.php
Modules/Media/Database/Seeders/MediaDatabaseSeeder.php
+0
-19
File.php
Modules/Media/Entities/File.php
+0
-24
FileTranslation.php
Modules/Media/Entities/FileTranslation.php
+0
-9
FileHelper.php
Modules/Media/Helpers/FileHelper.php
+0
-26
MediaController.php
Modules/Media/Http/Controllers/Admin/MediaController.php
+0
-117
MediaController.php
Modules/Media/Http/Controllers/Api/MediaController.php
+0
-31
UpdateMediaRequest.php
Modules/Media/Http/Requests/UpdateMediaRequest.php
+0
-21
UploadMediaRequest.php
Modules/Media/Http/Requests/UploadMediaRequest.php
+0
-21
routes.php
Modules/Media/Http/routes.php
+0
-26
Imagy.php
Modules/Media/Image/Facade/Imagy.php
+0
-8
ImageFactoryInterface.php
Modules/Media/Image/ImageFactoryInterface.php
+0
-11
ImageHandlerInterface.php
Modules/Media/Image/ImageHandlerInterface.php
+0
-12
ImageServiceProvider.php
Modules/Media/Image/ImageServiceProvider.php
+0
-49
Imagy.php
Modules/Media/Image/Imagy.php
+0
-195
InterventionFactory.php
Modules/Media/Image/Intervention/InterventionFactory.php
+0
-17
Blur.php
Modules/Media/Image/Intervention/Manipulations/Blur.php
+0
-23
Brightness.php
...les/Media/Image/Intervention/Manipulations/Brightness.php
+0
-23
Colorize.php
Modules/Media/Image/Intervention/Manipulations/Colorize.php
+0
-25
Contrast.php
Modules/Media/Image/Intervention/Manipulations/Contrast.php
+0
-23
Crop.php
Modules/Media/Image/Intervention/Manipulations/Crop.php
+0
-26
Fit.php
Modules/Media/Image/Intervention/Manipulations/Fit.php
+0
-27
Flip.php
Modules/Media/Image/Intervention/Manipulations/Flip.php
+0
-23
Gamma.php
Modules/Media/Image/Intervention/Manipulations/Gamma.php
+0
-23
Greyscale.php
Modules/Media/Image/Intervention/Manipulations/Greyscale.php
+0
-17
Heighten.php
Modules/Media/Image/Intervention/Manipulations/Heighten.php
+0
-25
Invert.php
Modules/Media/Image/Intervention/Manipulations/Invert.php
+0
-17
LimitColors.php
...es/Media/Image/Intervention/Manipulations/LimitColors.php
+0
-24
Opacity.php
Modules/Media/Image/Intervention/Manipulations/Opacity.php
+0
-23
Orientate.php
Modules/Media/Image/Intervention/Manipulations/Orientate.php
+0
-17
Pixelate.php
Modules/Media/Image/Intervention/Manipulations/Pixelate.php
+0
-23
Resize.php
Modules/Media/Image/Intervention/Manipulations/Resize.php
+0
-26
Rotate.php
Modules/Media/Image/Intervention/Manipulations/Rotate.php
+0
-24
Sharpen.php
Modules/Media/Image/Intervention/Manipulations/Sharpen.php
+0
-23
Trim.php
Modules/Media/Image/Intervention/Manipulations/Trim.php
+0
-26
Widen.php
Modules/Media/Image/Intervention/Manipulations/Widen.php
+0
-25
ThumbnailsManager.php
Modules/Media/Image/ThumbnailsManager.php
+0
-53
MediaServiceProvider.php
Modules/Media/Providers/MediaServiceProvider.php
+0
-76
RouteServiceProvider.php
Modules/Media/Providers/RouteServiceProvider.php
+0
-47
EloquentFileRepository.php
...es/Media/Repositories/Eloquent/EloquentFileRepository.php
+0
-46
FileRepository.php
Modules/Media/Repositories/FileRepository.php
+0
-14
media.php
Modules/Media/Resources/lang/en/media.php
+0
-24
messages.php
Modules/Media/Resources/lang/en/messages.php
+0
-6
media.php
Modules/Media/Resources/lang/fr/media.php
+0
-19
messages.php
Modules/Media/Resources/lang/fr/messages.php
+0
-6
edit.blade.php
Modules/Media/Resources/views/admin/edit.blade.php
+0
-41
grid.blade.php
Modules/Media/Resources/views/admin/grid.blade.php
+0
-48
index.blade.php
Modules/Media/Resources/views/admin/index.blade.php
+0
-162
edit-fields.blade.php
...edia/Resources/views/admin/partials/edit-fields.blade.php
+0
-18
FileService.php
Modules/Media/Services/FileService.php
+0
-65
FileHelperTest.php
Modules/Media/Tests/FileHelperTest.php
+0
-16
ImagyTest.php
Modules/Media/Tests/ImagyTest.php
+0
-91
composer.json
Modules/Media/composer.json
+0
-31
composers.php
Modules/Media/composers.php
+0
-3
module.json
Modules/Media/module.json
+0
-19
readme.md
Modules/Media/readme.md
+0
-5
start.php
Modules/Media/start.php
+0
-3
No files found.
Modules/Media/.sensiolabs.yml
deleted
100644 → 0
View file @
923353a1
rules
:
php.interface_has_no_interface_suffix
:
enabled
:
false
Modules/Media/.travis.yml
deleted
100644 → 0
View file @
923353a1
language
:
php
php
:
-
5.6
-
5.5
-
5.4
-
hhvm
Modules/Media/Assets/css/dropzone.css
deleted
100644 → 0
View file @
923353a1
This diff is collapsed.
Click to expand it.
Modules/Media/Assets/images/spritemap.png
deleted
100644 → 0
View file @
923353a1
9.97 KB
Modules/Media/Assets/images/spritemap@2x.png
deleted
100644 → 0
View file @
923353a1
34.8 KB
Modules/Media/Assets/js/dropzone.js
deleted
100644 → 0
View file @
923353a1
This diff is collapsed.
Click to expand it.
Modules/Media/Composers/SidebarViewComposer.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Composers
;
use
Illuminate\Contracts\View\View
;
use
Modules\Core\Composers\BaseSidebarViewComposer
;
class
SidebarViewComposer
extends
BaseSidebarViewComposer
{
public
function
compose
(
View
$view
)
{
$view
->
items
->
put
(
'medias'
,
[
'weight'
=>
6
,
'request'
=>
"*/
$view->prefix
/media*"
,
'route'
=>
'dashboard.media.index'
,
'icon-class'
=>
'fa fa-camera'
,
'title'
=>
'Medias'
,
'permission'
=>
$this
->
auth
->
hasAccess
(
'media.index'
)
]);
}
}
Modules/Media/Config/config.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
/*
|--------------------------------------------------------------------------
| The path where the media files will be uploaded
|--------------------------------------------------------------------------
*/
'files-path'
=>
'/assets/media/'
,
/*
|--------------------------------------------------------------------------
| Specify all the allowed file extensions a user can upload on the server
|--------------------------------------------------------------------------
*/
'allowed-types'
=>
'.jpg,.png'
,
/*
|--------------------------------------------------------------------------
| Determine the max file size upload rate
| Defined in MB
|--------------------------------------------------------------------------
*/
'max-file-size'
=>
'5'
];
Modules/Media/Config/permissions.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'media'
=>
[
'index'
,
'create'
,
'store'
,
'edit'
,
'update'
,
'destroy'
,
]
];
Modules/Media/Config/thumbnails.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'smallThumb'
=>
[
'fit'
=>
[
'width'
=>
50
,
'height'
=>
50
,
'callback'
=>
function
(
$constraint
)
{
$constraint
->
upsize
();
}
],
]
];
Modules/Media/Console/RefreshThumbnailCommand.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Console
;
use
Illuminate\Console\Command
;
use
Modules\Media\Image\Imagy
;
use
Modules\Media\Repositories\FileRepository
;
class
RefreshThumbnailCommand
extends
Command
{
protected
$name
=
'asgard:media:refresh'
;
protected
$description
=
'Create and or refresh the thumbnails'
;
/**
* @var Imagy
*/
private
$imagy
;
/**
* @var FileRepository
*/
private
$file
;
public
function
__construct
(
Imagy
$imagy
,
FileRepository
$file
)
{
parent
::
__construct
();
$this
->
imagy
=
$imagy
;
$this
->
file
=
$file
;
}
/**
* Execute the console command.
*
* @return mixed
*/
public
function
fire
()
{
$this
->
line
(
'Preparing to regenerate all thumbnails...'
);
foreach
(
$this
->
file
->
all
()
as
$file
)
{
$this
->
imagy
->
createAll
(
$file
->
path
);
}
$this
->
info
(
'All thumbnails refreshed'
);
}
}
Modules/Media/Database/Migrations/2014_10_26_162751_create_files_table.php
deleted
100644 → 0
View file @
923353a1
<?php
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateFilesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'files'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'filename'
);
$table
->
string
(
'path'
);
$table
->
string
(
'extension'
);
$table
->
string
(
'mimetype'
);
$table
->
string
(
'filesize'
);
$table
->
integer
(
'folder_id'
)
->
unsigned
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
drop
(
'files'
);
}
}
Modules/Media/Database/Migrations/2014_10_26_162811_create_file_translations_table.php
deleted
100644 → 0
View file @
923353a1
<?php
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateFileTranslationsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'file_translations'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
integer
(
'file_id'
)
->
unsigned
();
$table
->
string
(
'locale'
)
->
index
();
$table
->
string
(
'description'
);
$table
->
string
(
'alt_attribute'
);
$table
->
string
(
'keywords'
);
$table
->
unique
([
'file_id'
,
'locale'
]);
$table
->
foreign
(
'file_id'
)
->
references
(
'id'
)
->
on
(
'files'
)
->
onDelete
(
'cascade'
);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
drop
(
'file_translations'
);
}
}
Modules/Media/Database/Seeders/MediaDatabaseSeeder.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Database\Seeders
;
use
Illuminate\Database\Seeder
;
use
Illuminate\Database\Eloquent\Model
;
class
MediaDatabaseSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
Model
::
unguard
();
}
}
Modules/Media/Entities/File.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Entities
;
use
Dimsav\Translatable\Translatable
;
use
Illuminate\Database\Eloquent\Model
;
class
File
extends
Model
{
use
Translatable
;
public
$translatedAttributes
=
[
'description'
,
'alt_attribute'
,
'keywords'
];
protected
$fillable
=
[
'description'
,
'alt_attribute'
,
'keywords'
,
'filename'
,
'path'
,
'extension'
,
'mimetype'
,
'width'
,
'height'
,
'filesize'
,
'folder_id'
];
}
Modules/Media/Entities/FileTranslation.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Entities
;
use
Illuminate\Database\Eloquent\Model
;
class
FileTranslation
extends
Model
{
public
$timestamps
=
false
;
protected
$fillable
=
[
'description'
,
'alt_attribute'
,
'keywords'
];
}
Modules/Media/Helpers/FileHelper.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Helpers
;
use
Illuminate\Support\Str
;
class
FileHelper
{
public
static
function
slug
(
$name
)
{
$extension
=
self
::
getExtension
(
$name
);
$name
=
str_replace
(
$extension
,
''
,
$name
);
$name
=
Str
::
slug
(
$name
);
return
$name
.
$extension
;
}
/**
* Get the extension from the given name
* @param $name
* @return string
*/
private
static
function
getExtension
(
$name
)
{
return
substr
(
$name
,
strrpos
(
$name
,
'.'
));
}
}
Modules/Media/Http/Controllers/Admin/MediaController.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Http\Controllers\Admin
;
use
Illuminate\Contracts\Config\Repository
;
use
Illuminate\Support\Facades\Redirect
;
use
Illuminate\Support\Facades\View
;
use
Laracasts\Flash\Flash
;
use
Modules\Core\Http\Controllers\Admin\AdminBaseController
;
use
Modules\Media\Entities\File
;
use
Modules\Media\Http\Requests\UpdateMediaRequest
;
use
Modules\Media\Image\Imagy
;
use
Modules\Media\Repositories\FileRepository
;
class
MediaController
extends
AdminBaseController
{
/**
* @var FileRepository
*/
private
$file
;
/**
* @var Repository
*/
private
$config
;
/**
* @var Imagy
*/
private
$imagy
;
public
function
__construct
(
FileRepository
$file
,
Repository
$config
,
Imagy
$imagy
)
{
$this
->
file
=
$file
;
$this
->
config
=
$config
;
$this
->
imagy
=
$imagy
;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public
function
index
()
{
$files
=
$this
->
file
->
all
();
$config
=
$this
->
config
->
get
(
'media::config'
);
return
View
::
make
(
'media::admin.index'
,
compact
(
'files'
,
'config'
));
}
public
function
gridFiles
()
{
$files
=
$this
->
file
->
all
();
return
View
::
make
(
'media::admin.grid'
,
compact
(
'files'
));
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public
function
create
()
{
return
\View
::
make
(
'media.create'
);
}
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public
function
store
()
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param File $file
* @return Response
*/
public
function
edit
(
File
$file
)
{
return
View
::
make
(
'media::admin.edit'
,
compact
(
'file'
));
}
/**
* Update the specified resource in storage.
*
* @param File $file
* @param UpdateMediaRequest $request
* @return Response
*/
public
function
update
(
File
$file
,
UpdateMediaRequest
$request
)
{
$this
->
file
->
update
(
$file
,
$request
->
all
());
Flash
::
success
(
trans
(
'media::messages.file updated'
));
return
Redirect
::
route
(
'dashboard.media.index'
);
}
/**
* Remove the specified resource from storage.
*
* @param File $file
* @internal param int $id
* @return Response
*/
public
function
destroy
(
File
$file
)
{
$this
->
imagy
->
deleteAllFor
(
$file
);
$this
->
file
->
destroy
(
$file
);
Flash
::
success
(
trans
(
'media::messages.file deleted'
));
return
Redirect
::
route
(
'dashboard.media.index'
);
}
}
Modules/Media/Http/Controllers/Api/MediaController.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Http\Controllers\Api
;
use
Illuminate\Support\Facades\Response
;
use
Modules\Media\Http\Requests\UploadMediaRequest
;
use
Modules\Media\Services\FileService
;
class
MediaController
{
/**
* @var FileService
*/
private
$fileService
;
public
function
__construct
(
FileService
$fileService
)
{
$this
->
fileService
=
$fileService
;
}
/**
* Store a newly created resource in storage.
*
* @param UploadMediaRequest $request
* @return Response
*/
public
function
store
(
UploadMediaRequest
$request
)
{
$savedFile
=
$this
->
fileService
->
store
(
$request
->
file
(
'file'
));
return
Response
::
json
(
$savedFile
->
toArray
());
}
}
Modules/Media/Http/Requests/UpdateMediaRequest.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Http\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
UpdateMediaRequest
extends
FormRequest
{
public
function
rules
()
{
return
[];
}
public
function
authorize
()
{
return
true
;
}
public
function
messages
()
{
return
[];
}
}
Modules/Media/Http/Requests/UploadMediaRequest.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Http\Requests
;
use
Illuminate\Foundation\Http\FormRequest
;
class
UploadMediaRequest
extends
FormRequest
{
public
function
rules
()
{
return
[];
}
public
function
authorize
()
{
return
true
;
}
public
function
messages
()
{
return
[];
}
}
Modules/Media/Http/routes.php
deleted
100644 → 0
View file @
923353a1
<?php
use
Illuminate\Routing\Router
;
$router
->
model
(
'media'
,
'Modules\Media\Entities\File'
);
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin|permissions'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Media\Http\Controllers'
],
function
(
Router
$router
)
{
$router
->
resource
(
'media'
,
'Admin\MediaController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
'index'
=>
'dashboard.media.index'
,
'create'
=>
'dashboard.media.create'
,
'store'
=>
'dashboard.media.store'
,
'edit'
=>
'dashboard.media.edit'
,
'update'
=>
'dashboard.media.update'
,
'destroy'
=>
'dashboard.media.destroy'
,
]]);
});
});
$router
->
get
(
'admin/grid-files'
,
'Modules\Media\Http\Controllers\Admin\MediaController@gridFiles'
);
$router
->
group
([
'prefix'
=>
'api'
,
'namespace'
=>
'Modules\Media\Http\Controllers'
],
function
(
Router
$router
)
{
$router
->
resource
(
'file'
,
'Api\MediaController'
,
[
'only'
=>
[
'store'
]]);
});
Modules/Media/Image/Facade/Imagy.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Facade
;
use
Illuminate\Support\Facades\Facade
;
class
Imagy
extends
Facade
{
protected
static
function
getFacadeAccessor
()
{
return
'imagy'
;
}
}
Modules/Media/Image/ImageFactoryInterface.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image
;
interface
ImageFactoryInterface
{
/**
* Return a new Manipulation class
* @param string $manipulation
* @return \Modules\Media\Image\ImageHandlerInterface
*/
public
function
make
(
$manipulation
);
}
Modules/Media/Image/ImageHandlerInterface.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image
;
interface
ImageHandlerInterface
{
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
);
}
Modules/Media/Image/ImageServiceProvider.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image
;
use
Illuminate\Foundation\AliasLoader
;
use
Illuminate\Support\ServiceProvider
;
use
Modules\Media\Image\Intervention\InterventionFactory
;
class
ImageServiceProvider
extends
ServiceProvider
{
public
function
boot
()
{
$this
->
package
(
'nwidart/imagy'
);
}
/**
* Register the service provider.
*
* @return void
*/
public
function
register
()
{
$this
->
app
->
bind
(
'Modules\Media\Image\ImageFactoryInterface'
,
'Modules\Media\Image\Intervention\InterventionFactory'
);
$this
->
app
[
'imagy'
]
=
$this
->
app
->
share
(
function
(
$app
)
{
$factory
=
new
InterventionFactory
;
$thumbnailManager
=
new
ThumbnailsManager
(
$app
[
'config'
],
$app
[
'modules'
]);
return
new
Imagy
(
$factory
,
$thumbnailManager
,
$app
[
'config'
]);
});
$this
->
app
->
booting
(
function
()
{
$loader
=
AliasLoader
::
getInstance
();
$loader
->
alias
(
'Imagy'
,
'Modules\Media\Image\Facade\Imagy'
);
});
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public
function
provides
()
{
return
[
'imagy'
];
}
}
Modules/Media/Image/Imagy.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image
;
use
Illuminate\Contracts\Config\Repository
;
use
Illuminate\Support\Facades\App
;
use
Modules\Media\Entities\File
;
class
Imagy
{
/**
* @var \Intervention\Image\Image
*/
private
$image
;
/**
* @var \Illuminate\Filesystem\Filesystem
*/
private
$finder
;
/**
* @var ImageFactoryInterface
*/
private
$imageFactory
;
/**
* @var ThumbnailsManager
*/
private
$manager
;
/**
* All the different images types where thumbnails should be created
* @var array
*/
private
$imageExtensions
=
[
'jpg'
,
'png'
,
'jpeg'
,
'gif'
];
/**
* @var Repository
*/
private
$config
;
/**
* @param ImageFactoryInterface $imageFactory
* @param ThumbnailsManager $manager
* @param Repository $config
*/
public
function
__construct
(
ImageFactoryInterface
$imageFactory
,
ThumbnailsManager
$manager
,
Repository
$config
)
{
$this
->
image
=
App
::
make
(
'Intervention\Image\ImageManager'
);
$this
->
finder
=
App
::
make
(
'Illuminate\Filesystem\Filesystem'
);
$this
->
imageFactory
=
$imageFactory
;
$this
->
manager
=
$manager
;
$this
->
config
=
$config
;
}
/**
* Get an image in the given thumbnail options
* @param string $path
* @param string $thumbnail
* @param bool $forceCreate
* @return string
*/
public
function
get
(
$path
,
$thumbnail
,
$forceCreate
=
false
)
{
if
(
!
$this
->
isImage
(
$path
))
{
return
;
}
$filename
=
$this
->
config
->
get
(
'media::config.files-path'
)
.
$this
->
newFilename
(
$path
,
$thumbnail
);
if
(
$this
->
returnCreatedFile
(
$filename
,
$forceCreate
))
{
return
$filename
;
}
$this
->
makeNew
(
$path
,
$filename
,
$thumbnail
);
return
$filename
;
}
/**
* Return the thumbnail path
* @param string $originalImage
* @param string $thumbnail
* @return string
*/
public
function
getThumbnail
(
$originalImage
,
$thumbnail
)
{
if
(
!
$this
->
isImage
(
$originalImage
))
{
return
$originalImage
;
}
return
$this
->
config
->
get
(
'media::config.files-path'
)
.
$this
->
newFilename
(
$originalImage
,
$thumbnail
);
}
/**
* Create all thumbnails for the given image path
* @param string $path
*/
public
function
createAll
(
$path
)
{
if
(
!
$this
->
isImage
(
$path
))
{
return
;
}
foreach
(
$this
->
manager
->
all
()
as
$thumbName
=>
$filters
)
{
$image
=
$this
->
image
->
make
(
public_path
()
.
$path
);
$filename
=
$this
->
config
->
get
(
'media::config.files-path'
)
.
$this
->
newFilename
(
$path
,
$thumbName
);
foreach
(
$filters
as
$manipulation
=>
$options
)
{
$image
=
$this
->
imageFactory
->
make
(
$manipulation
)
->
handle
(
$image
,
$options
);
}
$image
=
$image
->
encode
(
pathinfo
(
$path
,
PATHINFO_EXTENSION
));
$this
->
writeImage
(
$filename
,
$image
);
}
}
/**
* Prepend the thumbnail name to filename
* @param $path
* @param $thumbnail
* @return mixed|string
*/
private
function
newFilename
(
$path
,
$thumbnail
)
{
$filename
=
pathinfo
(
$path
,
PATHINFO_FILENAME
);
return
$filename
.
'_'
.
$thumbnail
.
'.'
.
pathinfo
(
$path
,
PATHINFO_EXTENSION
);
}
/**
* Return the already created file if it exists and force create is false
* @param string $filename
* @param bool $forceCreate
* @return bool
*/
private
function
returnCreatedFile
(
$filename
,
$forceCreate
)
{
return
$this
->
finder
->
isFile
(
public_path
()
.
$filename
)
&&
!
$forceCreate
;
}
/**
* Write the given image
* @param string $filename
* @param string $image
*/
private
function
writeImage
(
$filename
,
$image
)
{
$this
->
finder
->
put
(
public_path
()
.
$filename
,
$image
);
}
/**
* Make a new image
* @param string $path
* @param string $filename
* @param string null $thumbnail
*/
private
function
makeNew
(
$path
,
$filename
,
$thumbnail
)
{
$image
=
$this
->
image
->
make
(
public_path
()
.
$path
);
foreach
(
$this
->
manager
->
find
(
$thumbnail
)
as
$manipulation
=>
$options
)
{
$image
=
$this
->
imageFactory
->
make
(
$manipulation
)
->
handle
(
$image
,
$options
);
}
$image
=
$image
->
encode
(
pathinfo
(
$path
,
PATHINFO_EXTENSION
));
$this
->
writeImage
(
$filename
,
$image
);
}
/**
* Check if the given path is en image
* @param string $path
* @return bool
*/
public
function
isImage
(
$path
)
{
return
in_array
(
pathinfo
(
$path
,
PATHINFO_EXTENSION
),
$this
->
imageExtensions
);
}
/**
* Delete all files on disk for the given file in storage
* This means the original and the thumbnails
* @param $file
* @return bool
*/
public
function
deleteAllFor
(
File
$file
)
{
if
(
!
$this
->
isImage
(
$file
->
path
))
{
return
$this
->
finder
->
delete
(
$file
->
path
);
}
$paths
[]
=
public_path
()
.
$file
->
path
;
$fileName
=
pathinfo
(
$file
->
path
,
PATHINFO_FILENAME
);
$extension
=
pathinfo
(
$file
->
path
,
PATHINFO_EXTENSION
);
foreach
(
$this
->
manager
->
all
()
as
$thumbnail
=>
$filters
)
{
$paths
[]
=
public_path
()
.
$this
->
config
->
get
(
'media::config.files-path'
)
.
"
{
$fileName
}
_
{
$thumbnail
}
.
{
$extension
}
"
;
}
return
$this
->
finder
->
delete
(
$paths
);
}
}
Modules/Media/Image/Intervention/InterventionFactory.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention
;
use
Modules\Media\Image\ImageFactoryInterface
;
class
InterventionFactory
implements
ImageFactoryInterface
{
/**
* @param string $manipulation
* @return \Modules\Media\Image\ImageHandlerInterface
*/
public
function
make
(
$manipulation
)
{
$class
=
'Modules\\Media\\Image\\Intervention\\Manipulations\\'
.
ucfirst
(
$manipulation
);
return
new
$class
;
}
}
Modules/Media/Image/Intervention/Manipulations/Blur.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Blur
implements
ImageHandlerInterface
{
private
$defaults
=
[
'amount'
=>
1
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
blur
(
$options
[
'amount'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Brightness.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Brightness
implements
ImageHandlerInterface
{
private
$defaults
=
[
'level'
=>
1
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
brightness
(
$options
[
'level'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Colorize.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Colorize
implements
ImageHandlerInterface
{
private
$defaults
=
[
'red'
=>
100
,
'green'
=>
100
,
'blue'
=>
100
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
colorize
(
$options
[
'red'
],
$options
[
'green'
],
$options
[
'blue'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Contrast.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Contrast
implements
ImageHandlerInterface
{
private
$defaults
=
[
'level'
=>
0
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
contrast
(
$options
[
'level'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Crop.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Crop
implements
ImageHandlerInterface
{
private
$defaults
=
[
'width'
=>
'100'
,
'height'
=>
'100'
,
'x'
=>
null
,
'y'
=>
null
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return mixed
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
crop
(
$options
[
'width'
],
$options
[
'height'
],
$options
[
'x'
],
$options
[
'y'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Fit.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Fit
implements
ImageHandlerInterface
{
private
$defaults
=
[
'width'
=>
100
,
'height'
=>
null
,
'position'
=>
'center'
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
$callback
=
isset
(
$options
[
'callback'
])
?
$options
[
'callback'
]
:
null
;
return
$image
->
fit
(
$options
[
'width'
],
$options
[
'height'
],
$callback
,
$options
[
'position'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Flip.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Flip
implements
ImageHandlerInterface
{
private
$defaults
=
[
'mode'
=>
'h'
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
flip
(
$options
[
'mode'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Gamma.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Gamma
implements
ImageHandlerInterface
{
private
$defaults
=
[
'correction'
=>
0
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
gamma
(
$options
[
'correction'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Greyscale.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Greyscale
implements
ImageHandlerInterface
{
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
return
$image
->
greyscale
();
}
}
Modules/Media/Image/Intervention/Manipulations/Heighten.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Heighten
implements
ImageHandlerInterface
{
private
$defaults
=
[
'height'
=>
0
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
$callback
=
isset
(
$options
[
'callback'
])
?
$options
[
'callback'
]
:
null
;
return
$image
->
heighten
(
$options
[
'height'
],
$callback
);
}
}
Modules/Media/Image/Intervention/Manipulations/Invert.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Invert
implements
ImageHandlerInterface
{
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
return
$image
->
invert
();
}
}
Modules/Media/Image/Intervention/Manipulations/LimitColors.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
LimitColors
implements
ImageHandlerInterface
{
private
$defaults
=
[
'count'
=>
255
,
'matte'
=>
null
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
limitColors
(
$options
[
'count'
],
$options
[
'matte'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Opacity.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Opacity
implements
ImageHandlerInterface
{
private
$defaults
=
[
'transparency'
=>
50
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
opacity
(
$options
[
'transparency'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Orientate.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Orientate
implements
ImageHandlerInterface
{
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
return
$image
->
orientate
();
}
}
Modules/Media/Image/Intervention/Manipulations/Pixelate.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Pixelate
implements
ImageHandlerInterface
{
private
$defaults
=
[
'size'
=>
0
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
pixelate
(
$options
[
'size'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Resize.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Resize
implements
ImageHandlerInterface
{
private
$defaults
=
[
'width'
=>
200
,
'height'
=>
200
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
$callback
=
isset
(
$options
[
'callback'
])
?
$options
[
'callback'
]
:
null
;
return
$image
->
resize
(
$options
[
'width'
],
$options
[
'height'
],
$callback
);
}
}
Modules/Media/Image/Intervention/Manipulations/Rotate.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Rotate
implements
ImageHandlerInterface
{
private
$defaults
=
[
'angle'
=>
45
,
'bgcolor'
=>
'#000000'
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
rotate
(
$options
[
'angle'
],
$options
[
'bgcolor'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Sharpen.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Sharpen
implements
ImageHandlerInterface
{
private
$defaults
=
[
'amount'
=>
10
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
sharpen
(
$options
[
'amount'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Trim.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Trim
implements
ImageHandlerInterface
{
private
$defaults
=
[
'base'
=>
'top-left'
,
'away'
=>
[
'top'
,
'bottom'
,
'left'
,
'right'
],
'tolerance'
=>
0
,
'feather'
=>
0
,
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
return
$image
->
trim
(
$options
[
'base'
],
$options
[
'away'
],
$options
[
'tolerance'
],
$options
[
'feather'
]);
}
}
Modules/Media/Image/Intervention/Manipulations/Widen.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image\Intervention\Manipulations
;
use
Modules\Media\Image\ImageHandlerInterface
;
class
Widen
implements
ImageHandlerInterface
{
private
$defaults
=
[
'width'
=>
0
];
/**
* Handle the image manipulation request
* @param \Intervention\Image\Image $image
* @param array $options
* @return \Intervention\Image\Image
*/
public
function
handle
(
$image
,
$options
)
{
$options
=
array_merge
(
$this
->
defaults
,
$options
);
$callback
=
isset
(
$options
[
'callback'
])
?
$options
[
'callback'
]
:
null
;
return
$image
->
widen
(
$options
[
'width'
],
$callback
);
}
}
Modules/Media/Image/ThumbnailsManager.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Image
;
use
Illuminate\Contracts\Config\Repository
;
class
ThumbnailsManager
{
/**
* @var Module
*/
private
$module
;
/**
* @var Repository
*/
private
$config
;
/**
* @param Repository $config
*/
public
function
__construct
(
Repository
$config
)
{
$this
->
module
=
app
(
'modules'
);
$this
->
config
=
$config
;
}
/**
* Return all thumbnails for all modules
* @return array
*/
public
function
all
()
{
$thumbnails
=
[];
foreach
(
$this
->
module
->
enabled
()
as
$enabledModule
)
{
$configuration
=
$this
->
config
->
get
(
strtolower
(
$enabledModule
->
getName
())
.
'::thumbnails'
);
if
(
!
is_null
(
$configuration
))
$thumbnails
=
array_merge
(
$thumbnails
,
$configuration
);
}
return
$thumbnails
;
}
/**
* Find the filters for the given thumbnail
* @param $thumbnail
*/
public
function
find
(
$thumbnail
)
{
foreach
(
$this
->
all
()
as
$thumbName
=>
$filters
)
{
if
(
$thumbName
==
$thumbnail
)
{
return
$filters
;
}
}
}
}
Modules/Media/Providers/MediaServiceProvider.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Providers
;
use
Illuminate\Support\ServiceProvider
;
use
Modules\Media\Console\RefreshThumbnailCommand
;
use
Modules\Media\Entities\File
;
use
Modules\Media\Image\Imagy
;
use
Modules\Media\Image\Intervention\InterventionFactory
;
use
Modules\Media\Image\ThumbnailsManager
;
use
Modules\Media\Repositories\Eloquent\EloquentFileRepository
;
class
MediaServiceProvider
extends
ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected
$defer
=
false
;
/**
* Register the service provider.
*
* @return void
*/
public
function
register
()
{
$this
->
app
->
booted
(
function
()
{
$this
->
registerBindings
();
});
$this
->
registerCommands
();
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public
function
provides
()
{
return
array
();
}
private
function
registerBindings
()
{
$this
->
app
->
bind
(
'Modules\Media\Repositories\FileRepository'
,
function
(
$app
)
{
return
new
EloquentFileRepository
(
new
File
,
$app
[
'filesystem.disk'
]);
}
);
}
/**
* Register all commands for this module
*/
private
function
registerCommands
()
{
$this
->
registerRefreshCommand
();
}
/**
* Register the refresh thumbnails command
*/
private
function
registerRefreshCommand
()
{
$this
->
app
->
bindShared
(
'command.media.refresh'
,
function
(
$app
)
{
$thumbnailManager
=
new
ThumbnailsManager
(
$app
[
'config'
],
$app
[
'modules'
]);
$imagy
=
new
Imagy
(
new
InterventionFactory
,
$thumbnailManager
,
$app
[
'config'
]);
return
new
RefreshThumbnailCommand
(
$imagy
,
$app
[
'Modules\Media\Repositories\FileRepository'
]);
});
$this
->
commands
(
'command.media.refresh'
);
}
}
Modules/Media/Providers/RouteServiceProvider.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Providers
;
use
Illuminate\Routing\Router
;
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
class
RouteServiceProvider
extends
ServiceProvider
{
/**
* The root namespace to assume when generating URLs to actions.
*
* @var string
*/
protected
$rootUrlNamespace
=
'Modules\Setting\Http\Controllers'
;
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected
$scan
=
[
'Modules\Setting\Http\Controllers'
,
];
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
* @param Router $router
* @return void
*/
public
function
before
(
Router
$router
)
{
//
}
/**
* Define the routes for the application.
*
* @return void
*/
public
function
map
(
Router
$router
)
{
require
__DIR__
.
'/../Http/routes.php'
;
}
}
Modules/Media/Repositories/Eloquent/EloquentFileRepository.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Repositories\Eloquent
;
use
Modules\Core\Repositories\Eloquent\EloquentBaseRepository
;
use
Modules\Media\Entities\File
;
use
Modules\Media\Helpers\FileHelper
;
use
Modules\Media\Repositories\FileRepository
;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
class
EloquentFileRepository
extends
EloquentBaseRepository
implements
FileRepository
{
/**
* Update a resource
* @param File $file
* @param $data
* @return mixed
*/
public
function
update
(
$file
,
$data
)
{
$file
->
update
(
$data
);
return
$file
;
}
/**
* Create a file row from the given file
* @param UploadedFile $file
* @return mixed
*/
public
function
createFromFile
(
UploadedFile
$file
)
{
$fileName
=
FileHelper
::
slug
(
$file
->
getClientOriginalName
());
return
$this
->
model
->
create
([
'filename'
=>
$fileName
,
'path'
=>
"/assets/media/
{
$fileName
}
"
,
'extension'
=>
$file
->
guessClientExtension
(),
'mimetype'
=>
$file
->
getClientMimeType
(),
'filesize'
=>
$file
->
getFileInfo
()
->
getSize
(),
]);
}
public
function
destroy
(
$file
)
{
$file
->
delete
();
}
}
Modules/Media/Repositories/FileRepository.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Repositories
;
use
Modules\Core\Repositories\BaseRepository
;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
interface
FileRepository
extends
BaseRepository
{
/**
* Create a file row from the given file
* @param UploadedFile $file
* @return mixed
*/
public
function
createFromFile
(
UploadedFile
$file
);
}
Modules/Media/Resources/lang/en/media.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'title'
=>
[
'media'
=>
'Media'
,
'edit media'
=>
'Edit media'
],
'breadcrumb'
=>
[
'media'
=>
'Media'
],
'table'
=>
[
'filename'
=>
'Filename'
,
'width'
=>
'Width'
,
'height'
=>
'Height'
],
'form'
=>
[
'alt_attribute'
=>
'Alt attribute'
,
'description'
=>
'Description'
,
'keywords'
=>
'Keywords'
,
],
'choose file'
=>
'Choose a file'
,
'insert'
=>
'Insert this file'
,
'file picker'
=>
'File Picker'
];
Modules/Media/Resources/lang/en/messages.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'file updated'
=>
'File updated'
,
'file deleted'
=>
'File deleted'
,
];
Modules/Media/Resources/lang/fr/media.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'title'
=>
[
'media'
=>
'Média'
,
'edit media'
=>
'Edition de média'
],
'breadcrumb'
=>
[
'media'
=>
'Média'
],
'table'
=>
[
'filename'
=>
'Nom de fichier'
,
'width'
=>
'Largeur'
,
'height'
=>
'Hauteur'
],
'choose file'
=>
'Choissisez un fichier'
,
'insert'
=>
'Sélectionner ce fichier'
,
'file picker'
=>
'Sélectionneur de fichier'
];
Modules/Media/Resources/lang/fr/messages.php
deleted
100644 → 0
View file @
923353a1
<?php
return
[
'file updated'
=>
'Fichier mit à jour'
,
'file deleted'
=>
'File suprimer'
,
];
Modules/Media/Resources/views/admin/edit.blade.php
deleted
100644 → 0
View file @
923353a1
@
extends
(
'core::layouts.master'
)
@
section
(
'content-header'
)
<
h1
>
{{
trans
(
'media::media.title.edit media'
)
}}
<
small
>
{{
$file
->
name
}}
</
small
>
</
h1
>
<
ol
class
="
breadcrumb
">
<li><a href="
{{
URL
::
route
(
'dashboard.index'
)
}}
"><i class="
fa
fa
-
dashboard
"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="
{{
URL
::
route
(
'dashboard.media.index'
)
}}
">{{ trans('media::media.title.media') }}</a></li>
<li class="
active
">{{ trans('media::media.title.edit media') }}</li>
</ol>
@stop
@section('content')
{!! Form::open(['route' => ['dashboard.media.update',
$file->id
], 'method' => 'put']) !!}
<div class="
row
">
<div class="
col
-
md
-
8
">
<div class="
nav
-
tabs
-
custom
">
@include('core::partials.form-tab-headers')
<div class="
tab
-
content
">
<?php
$i
= 0; ?>
<?php foreach(LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
): ?>
<?php
$i
++; ?>
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
" id="
tab_
{{
$i
}}
">
@include('media::admin.partials.edit-fields', ['lang' =>
$locale
])
</div>
<?php endforeach; ?>
<div class="
box
-
footer
">
<button type="
submit
" class="
btn
btn
-
primary
btn
-
flat
">{{ trans('core::core.button.update') }}</button>
<a class="
btn
btn
-
danger
pull
-
right
btn
-
flat
" href="
{{
URL
::
route
(
'dashboard.media.index'
)}}
"><i class="
fa
fa
-
times
"></i> {{ trans('core::core.button.cancel') }}</a>
</div>
</div>
</div> {{-- end nav-tabs-custom --}}
</div>
<div class="
col
-
md
-
4
">
<img src="
{{
$file
->
path
}}
" alt="" style="
width
:
100
%
;
"/>
</div>
</div>
{!! Form::close() !!}
@stop
Modules/Media/Resources/views/admin/grid.blade.php
deleted
100644 → 0
View file @
923353a1
<!doctype html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
{{ trans('media::media.file picker') }}
</title>
<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>
<style>
</style>
</head>
<body>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-8"
>
<h1>
{{ trans('media::media.choose file') }}
</h1>
<?php
if
(
$files
)
:
?>
<ul
class=
"list-unstyled"
>
<?php
foreach
(
$files
as
$file
)
:
?>
<li
class=
"pull-left"
style=
"margin-right: 20px"
>
<img
src=
"{{ $file->path }}"
alt=
""
class=
"img-thumbnail"
style=
"width: 250px;"
/>
<a
class=
"jsInsertImage btn btn-primary btn-flat"
href=
"#"
style=
"display: block"
>
{{ trans('media::media.insert') }}
</a>
</li>
<?php
endforeach
;
?>
</ul>
<?php
endif
;
?>
</div>
</div>
</div>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
.jsInsertImage
'
).
on
(
'
click
'
,
function
(
e
)
{
e
.
preventDefault
();
function
getUrlParam
(
paramName
)
{
var
reParam
=
new
RegExp
(
'
(?:[
\
?&]|&)
'
+
paramName
+
'
=([^&]+)
'
,
'
i
'
)
;
var
match
=
window
.
location
.
search
.
match
(
reParam
)
;
return
(
match
&&
match
.
length
>
1
)
?
match
[
1
]
:
null
;
}
var
funcNum
=
getUrlParam
(
'
CKEditorFuncNum
'
);
window
.
opener
.
CKEDITOR
.
tools
.
callFunction
(
funcNum
,
$
(
this
).
parent
().
find
(
'
img
'
).
attr
(
'
src
'
)
);
window
.
close
();
});
});
</script>
</body>
</html>
Modules/Media/Resources/views/admin/index.blade.php
deleted
100644 → 0
View file @
923353a1
@extends('core::layouts.master')
@section('content-header')
<h1>
{{ trans('media::media.title.media') }}
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"{{ URL::route('dashboard.index') }}"
><i
class=
"fa fa-dashboard"
></i>
{{ trans('core::core.breadcrumb.home') }}
</a></li>
<li><i
class=
"fa fa-camera"
></i>
{{ trans('media::media.breadcrumb.media') }}
</li>
</ol>
@stop
@section('styles')
<link
href=
"{!! Module::asset('media:css/dropzone.css') !!}"
rel=
"stylesheet"
type=
"text/css"
/>
<style>
.dropzone
{
border
:
1px
dashed
#CCC
;
min-height
:
227px
;
margin-bottom
:
20px
;
}
</style>
@stop
@section('content')
<div
class=
"row col-md-12"
>
<form
action=
"{{ URL::route('api.file.store')}}"
method=
"POST"
class=
"dropzone"
>
{!! Form::token() !!}
</form>
</div>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"box box-info"
>
<div
class=
"box-body table-responsive"
>
<table
class=
"data-table table table-bordered table-hover jsFileList"
>
<thead>
<tr>
<th>
{{ trans('media::media.table.filename') }}
</th>
<th>
{{ trans('core::core.table.thumbnail') }}
</th>
<th>
{{ trans('media::media.table.filename') }}
</th>
<th>
{{ trans('core::core.table.actions') }}
</th>
</tr>
</thead>
<tbody>
<?php
if
(
$files
)
:
?>
<?php
foreach
(
$files
as
$file
)
:
?>
<tr>
<td>
<a
href=
"{{ URL::route('dashboard.media.edit', [$file->id]) }}"
>
{{ $file->created_at }}
</a>
</td>
<td>
<img
src=
"{{ Imagy::getThumbnail($file->path, 'smallThumb') }}"
alt=
""
/>
</td>
<td>
<a
href=
"{{ URL::route('dashboard.media.edit', [$file->id]) }}"
>
{{ $file->filename }}
</a>
</td>
<td>
<div
class=
"btn-group"
>
<a
href=
"{{ URL::route('dashboard.media.edit', [$file->id]) }}"
class=
"btn btn-default btn-flat"
><i
class=
"glyphicon glyphicon-pencil"
></i></a>
<button
class=
"btn btn-danger btn-flat"
data-toggle=
"modal"
data-target=
"#confirmation-{{ $file->id }}"
><i
class=
"glyphicon glyphicon-trash"
></i></button>
</div>
</td>
</tr>
<?php
endforeach
;
?>
<?php
endif
;
?>
</tbody>
<tfoot>
<tr>
<th>
{{ trans('core::core.table.created at') }}
</th>
<th>
{{ trans('core::core.table.thumbnail') }}
</th>
<th>
{{ trans('media::media.table.filename') }}
</th>
<th>
{{ trans('core::core.table.actions') }}
</th>
</tr>
</tfoot>
</table>
<!-- /.box-body -->
</div>
</div>
</div>
</div>
<?php
if
(
$files
)
:
?>
<?php
foreach
(
$files
as
$file
)
:
?>
<!-- Modal -->
<div
class=
"modal fade"
id=
"confirmation-{{ $file->id }}"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
><span
aria-hidden=
"true"
>
×
</span><span
class=
"sr-only"
>
Close
</span></button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
{{ trans('core::core.modal.title') }}
</h4>
</div>
<div
class=
"modal-body"
>
{{ trans('core::core.modal.confirmation-message') }}
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
{{ trans('core::core.button.cancel') }}
</button>
{!! Form::open(['route' => ['dashboard.media.destroy', $file->id], 'method' => 'delete', 'class' => 'pull-left']) !!}
<button
type=
"submit"
class=
"btn btn-danger btn-flat"
><i
class=
"glyphicon glyphicon-trash"
></i>
{{ trans('core::core.button.delete') }}
</button>
{!! Form::close() !!}
</div>
</div>
</div>
</div>
<?php
endforeach
;
?>
<?php
endif
;
?>
@stop
@section('scripts')
<script
src=
"{!! Module::asset('media:js/dropzone.js') !!}"
></script>
<script>
$
(
document
).
ready
(
function
()
{
Dropzone
.
autoDiscover
=
false
;
var
myDropzone
=
new
Dropzone
(
"
.dropzone
"
,
{
url
:
$
(
this
).
attr
(
'
action
'
),
autoProcessQueue
:
true
,
maxFilesize
:
'
<?php
echo
$config
[
"max-file-size"
]
?>
'
,
acceptedFiles
:
'
<?php
echo
$config
[
"allowed-types"
]
?>
'
});
myDropzone
.
on
(
"
success
"
,
function
(
file
,
http
)
{
var
_this
=
this
;
window
.
setTimeout
(
function
(){
$
(
file
.
previewElement
).
fadeOut
(
'
fast
'
,
function
(){
_this
.
removeFile
(
file
);
});
var
tableRow
=
'
<tr><td>
'
+
http
.
created_at
+
'
</td><td></td><td>
'
+
http
.
filename
+
'
</td><td></td></tr>
'
;
var
elem
=
$
(
tableRow
).
css
(
'
display
'
,
'
none
'
);
$
(
'
.jsFileList tbody
'
).
prepend
(
elem
);
elem
.
fadeIn
();
},
1000
);
});
});
</script>
<?php
$locale
=
App
::
getLocale
();
?>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
'
.data-table
'
).
dataTable
({
"
paginate
"
:
true
,
"
lengthChange
"
:
true
,
"
filter
"
:
true
,
"
sort
"
:
true
,
"
info
"
:
true
,
"
autoWidth
"
:
true
,
"
order
"
:
[[
0
,
"
desc
"
]],
"
language
"
:
{
"
url
"
:
'
<?php
echo
Module
::
asset
(
"core:js/vendor/datatables/
{
$locale
}
.json"
)
?>
'
},
"
columns
"
:
[
null
,
null
,
null
,
{
"
sortable
"
:
false
}
]
});
});
</script>
@stop
Modules/Media/Resources/views/admin/partials/edit-fields.blade.php
deleted
100644 → 0
View file @
923353a1
<?php
$altAttribute
=
isset
(
$file
->
translate
(
$lang
)
->
alt_attribute
)
?
$file
->
translate
(
$lang
)
->
alt_attribute
:
''
?>
<div
class=
'form-group{{ $errors->has("{$lang}[alt_attribute]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("{$lang}[alt_attribute]", trans('media::media.form.alt_attribute')) !!}
{!! Form::text("{$lang}[alt_attribute]", Input::old("{$lang}[alt_attribute]", $altAttribute), ['class' => 'form-control', 'placeholder' => trans('media::media.form.alt_attribute')]) !!}
{!! $errors->first("{$lang}[alt_attribute]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
<?php
$description
=
isset
(
$file
->
translate
(
$lang
)
->
description
)
?
$file
->
translate
(
$lang
)
->
alt_attribute
:
''
?>
<div
class=
'form-group{{ $errors->has("{$lang}[description]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("{$lang}[description]", trans('media::media.form.description')) !!}
{!! Form::textarea("{$lang}[description]", Input::old("{$lang}[description]", $description), ['class' => 'form-control', 'placeholder' => trans('media::media.form.description')]) !!}
{!! $errors->first("{$lang}[description]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
<?php
$keywords
=
isset
(
$file
->
translate
(
$lang
)
->
keywords
)
?
$file
->
translate
(
$lang
)
->
alt_attribute
:
''
?>
<div
class=
'form-group{{ $errors->has("{$lang}[keywords]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("{$lang}[keywords]", trans('media::media.form.keywords')) !!}
{!! Form::text("{$lang}[keywords]", Input::old("{$lang}[keywords]", $keywords), ['class' => 'form-control', 'placeholder' => trans('media::media.form.keywords')]) !!}
{!! $errors->first("{$lang}[keywords]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
Modules/Media/Services/FileService.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Services
;
use
Illuminate\Contracts\Config\Repository
;
use
Illuminate\Contracts\Queue\Queue
;
use
Illuminate\Queue\Jobs\Job
;
use
Illuminate\Support\Facades\App
;
use
Modules\Media\Repositories\FileRepository
;
use
Symfony\Component\HttpFoundation\File\UploadedFile
;
class
FileService
{
/**
* @var FileRepository
*/
private
$file
;
/**
* @var Repository
*/
private
$config
;
/**
* @var Queue
*/
private
$queue
;
public
function
__construct
(
FileRepository
$file
,
Repository
$config
,
Queue
$queue
)
{
$this
->
file
=
$file
;
$this
->
config
=
$config
;
$this
->
queue
=
$queue
;
}
/**
* @param UploadedFile $file
* @return mixed
*/
public
function
store
(
UploadedFile
$file
)
{
// Save the file info to db
$savedFile
=
$this
->
file
->
createFromFile
(
$file
);
// Move the uploaded file to files path
$file
->
move
(
public_path
()
.
$this
->
config
->
get
(
'media::config.files-path'
),
$savedFile
->
filename
);
$this
->
createThumbnails
(
$savedFile
);
return
$savedFile
;
}
/**
* Create the necessary thumbnails for the given file
* @param $savedFile
*/
private
function
createThumbnails
(
$savedFile
)
{
$this
->
queue
->
push
(
function
(
Job
$job
)
use
(
$savedFile
)
{
App
::
make
(
'imagy'
)
->
createAll
(
$savedFile
->
path
);
$job
->
delete
();
});
}
}
Modules/Media/Tests/FileHelperTest.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Tests
;
use
Modules\Core\Tests\BaseTestCase
;
use
Modules\Media\Helpers\FileHelper
;
class
FileHelperTest
extends
BaseTestCase
{
/** @test */
public
function
it_should_return_slugged_name_with_extension
()
{
$expected
=
'file-name.png'
;
$name
=
FileHelper
::
slug
(
'File Name.png'
);
$this
->
assertEquals
(
$expected
,
$name
);
}
}
Modules/Media/Tests/ImagyTest.php
deleted
100644 → 0
View file @
923353a1
<?php
namespace
Modules\Media\Tests
;
use
Illuminate\Support\Facades\App
;
use
Modules\Core\Tests\BaseTestCase
;
use
Modules\Media\Image\Imagy
;
use
Modules\Media\Image\Intervention\InterventionFactory
;
use
Modules\Media\Image\ThumbnailsManager
;
class
ImagyTest
extends
BaseTestCase
{
/**
* @var Imagy
*/
protected
$imagy
;
/**
* @var \Illuminate\Filesystem\Filesystem
*/
protected
$finder
;
/**
* @var \Illuminate\Contracts\Config\Repository
*/
protected
$config
;
/**
* @var string
*/
protected
$mediaPath
;
/**
*
*/
public
function
setUp
()
{
parent
::
setUp
();
$this
->
config
=
App
::
make
(
'Illuminate\Contracts\Config\Repository'
);
$module
=
App
::
make
(
'modules'
);
$this
->
finder
=
App
::
make
(
'Illuminate\Filesystem\Filesystem'
);
$this
->
imagy
=
new
Imagy
(
new
InterventionFactory
,
new
ThumbnailsManager
(
$this
->
config
,
$module
),
$this
->
config
);
$this
->
mediaPath
=
$this
->
config
->
get
(
'media::config.files-path'
);
}
/** @test */
public
function
it_should_create_a_file
()
{
if
(
$this
->
finder
->
isFile
(
public_path
()
.
"
{
$this
->
mediaPath
}
google-map_smallThumb.png"
))
{
$this
->
finder
->
delete
(
public_path
()
.
"
{
$this
->
mediaPath
}
google-map_smallThumb.png"
);
}
$this
->
imagy
->
get
(
"
{
$this
->
mediaPath
}
google-map.png"
,
'smallThumb'
,
true
);
$this
->
assertTrue
(
$this
->
finder
->
isFile
(
public_path
()
.
"
{
$this
->
mediaPath
}
google-map_smallThumb.png"
));
}
/** @test */
public
function
it_should_not_create_thumbs_for_pdf_files
()
{
$this
->
imagy
->
get
(
"
{
$this
->
mediaPath
}
test-pdf.pdf"
,
'smallThumb'
,
true
);
$this
->
assertFalse
(
$this
->
finder
->
isFile
(
public_path
()
.
"
{
$this
->
mediaPath
}
test-pdf_smallThumb.png"
));
}
/** @test */
public
function
it_should_return_thumbnail_path
()
{
$path
=
$this
->
imagy
->
getThumbnail
(
"
{
$this
->
mediaPath
}
google-map.png"
,
'smallThumb'
);
$expected
=
"
{
$this
->
mediaPath
}
google-map_smallThumb.png"
;
$this
->
assertEquals
(
$expected
,
$path
);
}
/** @test */
public
function
it_should_return_same_path_for_non_images
()
{
$path
=
$this
->
imagy
->
getThumbnail
(
"
{
$this
->
mediaPath
}
test-pdf.pdf"
,
'smallThumb'
);
$expected
=
"
{
$this
->
mediaPath
}
test-pdf.pdf"
;
$this
->
assertEquals
(
$expected
,
$path
);
}
/** @test */
public
function
it_should_detect_an_image
()
{
$jpg
=
$this
->
imagy
->
isImage
(
'image.jpg'
);
$png
=
$this
->
imagy
->
isImage
(
'image.png'
);
$pdf
=
$this
->
imagy
->
isImage
(
'pdf.pdf'
);
$this
->
assertTrue
(
$jpg
);
$this
->
assertTrue
(
$png
);
$this
->
assertFalse
(
$pdf
);
}
}
Modules/Media/composer.json
deleted
100644 → 0
View file @
923353a1
{
"name"
:
"asgardcms/media-module"
,
"type"
:
"asgard-module"
,
"description"
:
"Media module for AsgardCMS. Handles the media library."
,
"keywords"
:
[
"asgardcms"
,
"media"
,
"files"
,
"library"
,
"thumbnails"
,
"filters"
],
"license"
:
"MIT"
,
"authors"
:
[
{
"name"
:
"Nicolas Widart"
,
"email"
:
"info@asgardcms.com"
,
"role"
:
"Developer"
}
],
"support"
:
{
"email"
:
"support@asgardcms.com"
,
"issues"
:
"https://github.com/AsgardCms/Media/issues"
,
"source"
:
"https://github.com/AsgardCms/Media"
},
"require"
:
{
"php"
:
">=5.4"
,
"composer/installers"
:
"~1.0"
},
"minimum-stability"
:
"dev"
}
Modules/Media/composers.php
deleted
100644 → 0
View file @
923353a1
<?php
View
::
composer
(
'core::partials.sidebar-nav'
,
'Modules\Media\Composers\SidebarViewComposer'
);
Modules/Media/module.json
deleted
100644 → 0
View file @
923353a1
{
"name"
:
"Media"
,
"alias"
:
"media"
,
"description"
:
""
,
"keywords"
:
[
],
"active"
:
1
,
"require"
:
{
"intervention/image"
:
"~2.0"
},
"providers"
:
[
"Modules
\\
Media
\\
Providers
\\
MediaServiceProvider"
,
"Modules
\\
Media
\\
Providers
\\
RouteServiceProvider"
,
"Modules
\\
Media
\\
Image
\\
ImageServiceProvider"
],
"files"
:
[
"start.php"
]
}
Modules/Media/readme.md
deleted
100644 → 0
View file @
923353a1
# Media Module
[
![SensioLabsInsight
](
https://insight.sensiolabs.com/projects/648270bf-8b9c-4994-b006-a948fef307b2/mini.png
)
](https://insight.sensiolabs.com/projects/648270bf-8b9c-4994-b006-a948fef307b2)
[
![Scrutinizer Code Quality
](
https://scrutinizer-ci.com/g/AsgardCms/Media/badges/quality-score.png?b=master
)
](https://scrutinizer-ci.com/g/AsgardCms/Media/?branch=master)
[
![Code Climate
](
https://codeclimate.com/github/AsgardCms/Media/badges/gpa.svg
)
](https://codeclimate.com/github/AsgardCms/Media)
Modules/Media/start.php
deleted
100644 → 0
View file @
923353a1
<?php
require
__DIR__
.
'/composers.php'
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment