mrkushalsharma / symfony-media-manager
Media Manager For Symfony 4
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Type:symfony-bundle
Requires
- php: ^7.1
- apy/breadcrumbtrail-bundle: ^1.5
- asprega/breadcrumb-bundle: ^0.2.0
- beberlei/doctrineextensions: ^1.2
- doctrine/annotations: ^1.2
- doctrine/common: ^2.4
- doctrine/doctrine-bundle: ^1.6.10|^2.0
- doctrine/doctrine-cache-bundle: ^1.4
- doctrine/orm: ^2.5.11
- gedmo/doctrine-extensions: ^2.4
- h4cc/wkhtmltopdf-amd64: ^0.12.4
- knplabs/knp-snappy-bundle: ^1.6
- stof/doctrine-extensions-bundle: ^1.3
- symfony/asset: ^3.4|^4.0
- symfony/form: ^3.4|^4.0
- symfony/framework-bundle: ^3.4|^4.0
- symfony/routing: ^4.0
- symfony/templating: ^3.4|^4.0
- symfony/translation: ^3.4|^4.0
- symfony/twig-bundle: ^3.4|^4.0
- symfony/validator: ^3.4|^4.0
- white-october/pagerfanta-bundle: ^1.2
Requires (Dev)
- ext-pcntl: *
- doctrine/doctrine-fixtures-bundle: ^3.0.0
- php-coveralls/php-coveralls: ^2.0
- symfony/css-selector: ^3.4|^4.0
- symfony/security-bundle: ^3.4|^4.0
This package is auto-updated.
Last update: 2025-03-28 22:48:30 UTC
README
A Symfony 4 Media Manager
**Basic Usage**In your routes.yaml file add,
media_manager:
resource: "@MrkushalSharmaMediaManagerBundle/Resources/config/routing.yaml"
prefix: /
In your twig.yaml file, add
paths:
'%kernel.project_dir%/vendor/mrkushalsharma/symfony-media-manager/src/Templates': MrkushalSharma
Create a Directory inside public folder name uploads and inside upload directory create media and inside it create 3 media named large, medium and thumbnail.
Run command
bin/console asset:install
In your layout file also add css and script file
<link href="{{ asset('bundles/mrkushalsharmamediamanager/css/dropzone.css') }}" rel="stylesheet" type="text/css"></link>
<link href="{{ asset('bundles/mrkushalsharmamediamanager/css/style.css') }}" rel="stylesheet" type="text/css"></link>
<script src="{{ asset('bundles/mrkushalsharmamediamanager/js/dropzone.js') }}"></script>
<script src="{{ asset('bundles/mrkushalsharmamediamanager/js/bootbox.js') }}"></script>
<script src="{{ asset('bundles/mrkushalsharmamediamanager/js/common.js') }}"></script>
or {% include 'MrkushalSharma/Scripts/commonJs.html.twig' %}
<script src="{{ asset('bundles/fintechmediamanager/js/media.js') }}"></script>
or {% include '@Fintech/Scripts/mediaJs.html.twig' %}
Basic Example
<a href="#" data-popup="tooltip" class="changeCover" data-original-title="Click here to upload image" class="cursor-pointer btn bg-fn-pink" >change</a>
$('.changeCover').fnMediaModal({
onSuccess(res,_self){
}
});
for CKEditor : onclick="insertCkeditorImage(this,'post_description')
``` Add Media ```Input type example : onclick="insertImageUrl(this, 'featuredImage')"
``` ```to List Media : fn_media_list or /media/list
to List Media : fn_media_list or /media/list