From 503d97150a1a5075ea8730d16b14ebe3fa894554 Mon Sep 17 00:00:00 2001 From: Danny van Wijk Date: Thu, 1 Oct 2020 12:31:20 +0000 Subject: [PATCH 1/3] Configure asset packages and add package to asset call --- .../Resources/views/Layout/submenu.html.twig | 2 +- .../PageParts/PageBannerPagePart/view.html.twig | 2 +- .../views/PageParts/ServicePagePart/view.html.twig | 2 +- .../layout/Resources/views/Layout/_footer.html.twig | 2 +- .../layout/Resources/views/Layout/_header.html.twig | 6 +++--- .../views/PageParts/DownloadPagePart/view.html.twig | 2 +- .../views/PageParts/ImagePagePart/view.html.twig | 10 +++++----- .../views/PageParts/VideoPagePart/view.html.twig | 12 ++++++------ .../Resources/views/PageParts/view.html.twig | 6 +++--- .../DependencyInjection/KunstmaanMediaExtension.php | 9 +++++++++ .../views/AdminList/ItemAction/select.html.twig | 2 +- .../views/Chooser/chooserShowFolder.html.twig | 6 +++--- .../Resources/views/Folder/show.html.twig | 4 ++-- .../Resources/views/Form/formWidgets.html.twig | 4 ++-- .../Resources/views/Media/File/show.html.twig | 8 ++++---- .../Resources/views/Media/Image/show.html.twig | 6 +++--- .../Resources/views/DownloadPagePart/view.html.twig | 2 +- .../Resources/views/ImagePagePart/view.html.twig | 2 +- .../views/PagePartAdminTwigExtension/modal.html.twig | 2 +- .../views/SeoTwigExtension/metadata.html.twig | 8 ++++---- 20 files changed, 53 insertions(+), 44 deletions(-) diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig index 40fbc63528..2b9b9a3acb 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/defaultsite/Resources/views/Layout/submenu.html.twig @@ -9,7 +9,7 @@ diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig index 3cd4293665..1f18e817e9 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_footer.html.twig @@ -117,7 +117,7 @@ {% endif %}

diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig index 48b242cc21..1d1cad0be0 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/layout/Resources/views/Layout/_header.html.twig @@ -14,7 +14,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getRootNodeMenuItem() %} @@ -52,7 +52,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %} @@ -121,7 +121,7 @@ {# Logo #} {% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig index d5884762a6..9a7d5d3f0c 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/DownloadPagePart/view.html.twig @@ -5,7 +5,7 @@ {% endif %}

- {{ name }} + {{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

{% endif %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig index 6e991785c7..9e0fdf70fc 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/ImagePagePart/view.html.twig @@ -5,13 +5,13 @@ {% set imgUrl = '' %} {% if type in ['svg', 'gif'] %} - {% set imgUrl = absolute_url(asset(image)) %} + {% set imgUrl = absolute_url(asset(image, 'media')) %} {{ altText }} {% else %} - {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type)) %} - {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type)) %} - {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type)) %} - {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type)) %} + {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type), 'media') %} + {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type), 'media') %} + {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type), 'media') %} + {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type), 'media') %} {% set srcSet = imgUrl_small ~ ' 400w, ' ~ imgUrl_medium ~ ' 600w, ' ~ imgUrl_big ~ ' 1200w, ' ~ imgUrl_huge ~ ' 2400w' %} {# diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig index f1bed30fca..7744bf5434 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/VideoPagePart/view.html.twig @@ -5,13 +5,13 @@ {% set imgUrl = '' %} {% if type in ['svg', 'gif'] %} - {% set imgUrl = absolute_url(asset(image)) %} + {% set imgUrl = absolute_url(asset(image, 'media')) %} {{ altText }} {% else %} - {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type)) %} - {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type)) %} - {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type)) %} - {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type)) %} + {% set imgUrl_huge = asset(image | imagine_filter('image_huge_' ~ type), 'media') %} + {% set imgUrl_big = asset(image | imagine_filter('image_big_' ~ type), 'media') %} + {% set imgUrl_medium = asset(image | imagine_filter('image_medium_' ~ type), 'media') %} + {% set imgUrl_small = asset(image | imagine_filter('image_small_' ~ type), 'media') %} {% set srcSet = imgUrl_small ~ ' 400w,' ~ imgUrl_medium ~ ' 600w,' ~ imgUrl_big ~ ' 1200w,' ~ imgUrl_huge ~ ' 2400w'%} {{ altText }} @@ -27,7 +27,7 @@ {% set videoImage = asset('frontend/img/general/video-pp--default.svg') %} {% set imageType = 'jpg' %} {% if resource.thumbnail is not empty %} - {% set videoImage = asset(resource.thumbnail.url|imagine_filter('optim')) %} + {% set videoImage = asset(resource.thumbnail.url|imagine_filter('optim'), 'media') %} {% set imageType = resource.thumbnail.originalFilename|lower|split('.')|last %} {% endif %} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig index 517400af20..8c7c32b6ac 100644 --- a/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig +++ b/src/Kunstmaan/GeneratorBundle/Resources/SensioGeneratorBundle/skeleton/pagepart/Resources/views/PageParts/view.html.twig @@ -9,9 +9,9 @@ {% elseif key == 'link' %} {{ "{{ resource." ~ fieldArray['text']['fieldName'] ~ " }}" }} {% elseif key == 'image' %} - {{ "{% if resource." ~ fieldArray['image']['fieldName'] ~ " is not empty %}" }}{{ "{% endif %}" }} + {{ "{% if resource." ~ fieldArray['image']['fieldName'] ~ " is not empty %}" }}{{ "{% endif %}" }} {% elseif key == 'media' %} - {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}{{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ ".name }}" }}{{ "{% endif %}" }} + {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}{{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ ".name }}" }}{{ "{% endif %}" }} {% elseif key == 'single_ref' %} {{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " is not empty %}" }}
{{ fieldArray[0]['targetEntity'] }}: {{ "{{ resource." ~ fieldArray[0]['fieldName'] ~ " }}" }}
{{ "{% endif %}" }} {% elseif key == 'multi_ref' %} @@ -30,4 +30,4 @@
{{ "{% if resource." ~ fieldArray[0]['fieldName'] ~ " %}{{ resource." ~ fieldArray[0]['fieldName'] ~ "|date(\"Y-m-d H:i:s\") }}{% endif %}" }}
{% endif %} {% endfor %}{% endfor %} - \ No newline at end of file + diff --git a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php index 71e813b7ed..5a8b1778a2 100644 --- a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php +++ b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php @@ -114,6 +114,15 @@ public function prepend(ContainerBuilder $container) $container->prependExtensionConfig('doctrine', $doctrineGedmoEntityConfig); + $frameworkExtensionConfig = [ + 'assets' => [ + 'packages' => [ + 'media' => null, + ], + ], + ]; + $container->prependExtensionConfig('framework', $frameworkExtensionConfig); + $configs = $container->getExtensionConfig($this->getAlias()); $this->processConfiguration(new Configuration(), $configs); } diff --git a/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig index 305c35da10..9f8f38384e 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/AdminList/ItemAction/select.html.twig @@ -3,7 +3,7 @@ {% set cke = (app.request and app.request.get('CKEditorFuncNum')) %} {% set path = "[%s]" | format("M" ~ item.id) %} - + Select diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig index a6849a8b16..c42f7eb5d4 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Chooser/chooserShowFolder.html.twig @@ -201,15 +201,15 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} {% set path = "[%s]" | format("M" ~ media.id) %}
- +
{% if imageurl %} {{ media.name }} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig index 77b50c46bc..7be98502ee 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Folder/show.html.twig @@ -234,8 +234,8 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig index 4d279df9e0..3a28638ffb 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Form/formWidgets.html.twig @@ -64,8 +64,8 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurlretina = imageurl %} {% else %} - {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina')) %} - {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail')) %} + {% set imageurlretina = asset(imageurl | imagine_filter('media_list_thumbnail_retina'), 'media') %} + {% set imageurl = asset(imageurl | imagine_filter('media_list_thumbnail'), 'media') %} {% endif %} {% endif %} {% if imageurl %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig index 424719c96e..b098c240fa 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Media/File/show.html.twig @@ -1,7 +1,7 @@ {% extends '@KunstmaanMedia/Media/show.html.twig' %} {% block extraactions %} - + {{ 'media.media.download.action'|trans }} {% endblock %} @@ -14,9 +14,9 @@ {{ 'media.media.mediainfo.downloadlink'|trans }}:
- {% set mediaUrl = media.url %} - - {{ absolute_url(asset(mediaUrl)) }} + {% set mediaUrl = absolute_url(asset(media.url, 'media')) %} + + {{ mediaUrl }}
{% endblock %} diff --git a/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig b/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig index c36e7efad9..405844523a 100644 --- a/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig +++ b/src/Kunstmaan/MediaBundle/Resources/views/Media/Image/show.html.twig @@ -3,14 +3,14 @@ {% block extraactions %} {% if handler.aviaryApiKey and not (handler.aviaryApiKey starts with 'Register') %} - {% include '@KunstmaanMedia/Media/Image/aviary.html.twig' %} {% endif %} - + {{ 'media.media.download.action'|trans }} {% endblock %} @@ -21,7 +21,7 @@ {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} {% set imageurl = imageurl %} {% else %} - {% set imageurl = asset(imageurl | imagine_filter('media_detail_thumbnail')) %} + {% set imageurl = asset(imageurl | imagine_filter('media_detail_thumbnail'), 'media') %} {% endif %} {% endif %} {{ media.name }} diff --git a/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig b/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig index 0469464248..61e33c474c 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig +++ b/src/Kunstmaan/MediaPagePartBundle/Resources/views/DownloadPagePart/view.html.twig @@ -3,6 +3,6 @@ {% if name is empty %} {% set name = "Download" %} {% endif %} -

{{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

+

{{ name }} | {{ resource.media.contentTypeShort }} {{ resource.media.getFileSize() }}

{% endif %} diff --git a/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig b/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig index e0fde39700..05f069aaa3 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig +++ b/src/Kunstmaan/MediaPagePartBundle/Resources/views/ImagePagePart/view.html.twig @@ -2,7 +2,7 @@
{% set imgUrl = '' %} {% if app.request %} - {% set imgUrl = absolute_url(asset(resource.media.url)) %} + {% set imgUrl = absolute_url(asset(resource.media.url, 'media')) %} {% endif %} {% if resource.link is defined and resource.link != "" %} {{ resource.alttext }} diff --git a/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig index 97ca4c52a6..9b9046b1bc 100644 --- a/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig +++ b/src/Kunstmaan/PagePartBundle/Resources/views/PagePartAdminTwigExtension/modal.html.twig @@ -22,7 +22,7 @@ {% for pagePartType in pagepartadmin.possiblePagePartTypes %}
{% if pagePartType.preview is defined and pagePartType.preview is not empty %} - {% set background = asset(pagePartType.preview) %} + {% set background = asset(pagePartType.preview, 'media') %} {% else %} {% set background = asset('bundles/kunstmaanadmin/default-theme/img/kunstmaan/ppchooser-placeholder.svg') %} {% endif %} diff --git a/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig b/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig index 6d5f44384c..4c54db6c75 100644 --- a/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig +++ b/src/Kunstmaan/SeoBundle/Resources/views/SeoTwigExtension/metadata.html.twig @@ -59,13 +59,13 @@ {% else %} {% set imageUrl = seo.getOgImage().getUrl() | imagine_filter('fb_og_image') %} {% set dimensions = get_image_dimensions(imageUrl) %} - + {% if dimensions %} {% endif %} - + {% endif %} {% endif %} @@ -102,9 +102,9 @@ - + {% else %} - + {% endif %} {% endif %} {% endif %} From 5e627b739f4ccee6bf23c5c44524f2ff73170568 Mon Sep 17 00:00:00 2001 From: dannyvw Date: Thu, 5 Nov 2020 13:33:57 +0000 Subject: [PATCH 2/3] Fix form submission --- .../views/FileUploadPagePart/submission.html.twig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Kunstmaan/FormBundle/Resources/views/FileUploadPagePart/submission.html.twig b/src/Kunstmaan/FormBundle/Resources/views/FileUploadPagePart/submission.html.twig index d363eb73ff..0ed608e4f8 100644 --- a/src/Kunstmaan/FormBundle/Resources/views/FileUploadPagePart/submission.html.twig +++ b/src/Kunstmaan/FormBundle/Resources/views/FileUploadPagePart/submission.html.twig @@ -1,11 +1,10 @@ {% if resource is defined and resource is not null %} {% if not resource.isNull() %} {% if resource.url is defined and resource.url is not null %} - {% set href = host ~ resource.url %} + {% set href = asset(resource.url, 'media') %} {% else %} - {% set href = host ~ form_submission_webdir ~ resource.fileName %} + {% set href = asset(host ~ form_submission_webdir ~ resource.fileName, 'media') %} {% endif %} - {{ resource.fileName }} + {{ resource.fileName }} {% endif %} {% endif %} From 565c0b4a9db1f2307a3040c5e48fba9c7c97ed98 Mon Sep 17 00:00:00 2001 From: Danny van Wijk Date: Tue, 12 Oct 2021 13:28:40 +0000 Subject: [PATCH 3/3] Move asset configuration --- .../DependencyInjection/KunstmaanAdminExtension.php | 9 +++++++++ src/Kunstmaan/AdminBundle/composer.json | 1 + .../DependencyInjection/KunstmaanMediaExtension.php | 9 --------- src/Kunstmaan/MediaBundle/composer.json | 1 + 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/Kunstmaan/AdminBundle/DependencyInjection/KunstmaanAdminExtension.php b/src/Kunstmaan/AdminBundle/DependencyInjection/KunstmaanAdminExtension.php index e9e25061c6..95260bbaa8 100644 --- a/src/Kunstmaan/AdminBundle/DependencyInjection/KunstmaanAdminExtension.php +++ b/src/Kunstmaan/AdminBundle/DependencyInjection/KunstmaanAdminExtension.php @@ -132,6 +132,15 @@ public function prepend(ContainerBuilder $container) // NEXT_MAJOR: Remove templating dependency + $frameworkExtensionConfig = [ + 'assets' => [ + 'packages' => [ + 'media' => null, + ], + ], + ]; + $container->prependExtensionConfig('framework', $frameworkExtensionConfig); + $configs = $container->getExtensionConfig($this->getAlias()); $this->processConfiguration(new Configuration(), $configs); } diff --git a/src/Kunstmaan/AdminBundle/composer.json b/src/Kunstmaan/AdminBundle/composer.json index 383dd0f7eb..bd08040d33 100644 --- a/src/Kunstmaan/AdminBundle/composer.json +++ b/src/Kunstmaan/AdminBundle/composer.json @@ -26,6 +26,7 @@ "kunstmaan/utilities-bundle": "^5.9|^6.0", "symfony/swiftmailer-bundle": "^2.3|^3.0", "symfony/acl-bundle": "^1.0|^2.0", + "symfony/asset": "^3.4|^4.4", "symfony/cache": "^3.4|^4.4", "symfony/config": "^3.4|^4.4", "symfony/console": "^3.4|^4.4", diff --git a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php index 5a8b1778a2..71e813b7ed 100644 --- a/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php +++ b/src/Kunstmaan/MediaBundle/DependencyInjection/KunstmaanMediaExtension.php @@ -114,15 +114,6 @@ public function prepend(ContainerBuilder $container) $container->prependExtensionConfig('doctrine', $doctrineGedmoEntityConfig); - $frameworkExtensionConfig = [ - 'assets' => [ - 'packages' => [ - 'media' => null, - ], - ], - ]; - $container->prependExtensionConfig('framework', $frameworkExtensionConfig); - $configs = $container->getExtensionConfig($this->getAlias()); $this->processConfiguration(new Configuration(), $configs); } diff --git a/src/Kunstmaan/MediaBundle/composer.json b/src/Kunstmaan/MediaBundle/composer.json index b533401e31..c8311d76b0 100644 --- a/src/Kunstmaan/MediaBundle/composer.json +++ b/src/Kunstmaan/MediaBundle/composer.json @@ -20,6 +20,7 @@ "symfony/mime": "^4.4", "imagine/imagine": "^1.1", "knplabs/knp-gaufrette-bundle": "~0.1", + "kunstmaan/admin-bundle": "^5.9|^6.0", "kunstmaan/adminlist-bundle": "^5.9|^6.0", "pagerfanta/twig": "^2.4" },