- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax-content') with {
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax_content') with {
'behindElements' : behindElements,
'frontElements' : frontElements,
'sectionContent' : sectionContent
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/partial/behind-front-elements.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/partial/behind_front_elements.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/partial/behind-front-elements.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/partial/behind_front_elements.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/partial/parallax-content.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/partial/parallax_content.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/partial/parallax-content.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/partial/parallax_content.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/section.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/section.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/section.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/section.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/view.html.twig
similarity index 62%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/view.html.twig
index a1317c9a..5ff9aabc 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/view.html.twig
@@ -1 +1 @@
-{% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/background-' ~ backgroundMode) %}
+{% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/background_' ~ backgroundMode) %}
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/wrapper/container-wrapper.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/wrapper/container_wrapper.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax-container/wrapper/container-wrapper.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/parallax_container/wrapper/container_wrapper.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/slide-columns/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/slide_columns/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/slide-columns/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/slide_columns/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/teaser/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/teaser/view.html.twig
index 69836885..729fb91a 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/teaser/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/teaser/view.html.twig
@@ -4,7 +4,7 @@
{% if layout is empty %}
{% set layout = 'standard' %}
{% endif %}
- {% include '@Toolbox/snippet/teaser-' ~ layout ~ '.html.twig' %}
+ {% include '@Toolbox/snippet/teaser_' ~ layout ~ '.html.twig' %}
{% else %}
{# "teaser-standard" is the snippet name. define your teaser layout in the specific teaser snippet! #}
{{ pimcore_snippet('teaser-standard', {'useLightBox' : pimcore_checkbox('use_light_box').isChecked()}) }}
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-asset.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_asset.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-asset.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_asset.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-vimeo.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_vimeo.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-vimeo.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_vimeo.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-youtube.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_youtube.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type-youtube.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/type_youtube.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/view.html.twig
index 00f15267..1c257939 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap3/video/view.html.twig
@@ -14,7 +14,7 @@
{% else %}
- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type-' ~ videoType) %}
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type_' ~ videoType) %}
{% endif %}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion-tab/accordion.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion_tab/accordion.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion-tab/accordion.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion_tab/accordion.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion-tab/tab.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion_tab/tab.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion-tab/tab.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/accordion_tab/tab.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/view.html.twig
index 4519a4d6..45406986 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/accordion/view.html.twig
@@ -1 +1 @@
-{% include toolbox_area_path(areaId, areaTemplateDirectory, '/accordion-tab/' ~ (pimcore_select('component').data == 'tab' ? 'tab' : 'accordion')) %}
\ No newline at end of file
+{% include toolbox_area_path(areaId, areaTemplateDirectory, '/accordion_tab/' ~ (pimcore_select('component').data == 'tab' ? 'tab' : 'accordion')) %}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/content/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/content/view.html.twig
index 97bc5037..3b1c6ff9 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/content/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/content/view.html.twig
@@ -1 +1 @@
-{{ pimcore_wysiwyg('wysiwyg', {'width' : '100%', 'customConfig' : toolbox_get_ckeditor_config_path()}) }}
\ No newline at end of file
+{{ pimcore_wysiwyg('wysiwyg', {'width' : '100%'}) }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google-map/info-window.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google_map/info_window.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google-map/info-window.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google_map/info_window.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google-map/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google_map/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google-map/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/google_map/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/link-list/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/link_list/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/link-list/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/link_list/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-prepend.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_prepend.html.twig
similarity index 90%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-prepend.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_prepend.html.twig
index 2b885e2f..e1a9a416 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-prepend.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_prepend.html.twig
@@ -1,6 +1,6 @@
- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax-content') with {
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax_content') with {
'behindElements' : behindElements,
'frontElements' : frontElements,
'sectionContent' : sectionContent
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-wrap.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_wrap.html.twig
similarity index 88%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-wrap.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_wrap.html.twig
index 5638f5f4..cfde289a 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/background-wrap.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/background_wrap.html.twig
@@ -1,5 +1,5 @@
- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax-content') with {
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/parallax_content') with {
'behindElements' : behindElements,
'frontElements' : frontElements,
'sectionContent' : sectionContent
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/behind-front-elements.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/behind_front_elements.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/behind-front-elements.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/behind_front_elements.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/parallax-content.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/parallax_content.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/partial/parallax-content.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/partial/parallax_content.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/section.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/section.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/section.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/section.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/view.html.twig
similarity index 62%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/view.html.twig
index a1317c9a..5ff9aabc 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/view.html.twig
@@ -1 +1 @@
-{% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/background-' ~ backgroundMode) %}
+{% include toolbox_area_path(areaId, areaTemplateDirectory, 'partial/background_' ~ backgroundMode) %}
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/wrapper/container-wrapper.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/wrapper/container_wrapper.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax-container/wrapper/container-wrapper.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/parallax_container/wrapper/container_wrapper.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/slide-columns/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/slide_columns/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/slide-columns/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/slide_columns/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/teaser/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/teaser/view.html.twig
index 69836885..729fb91a 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/teaser/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/teaser/view.html.twig
@@ -4,7 +4,7 @@
{% if layout is empty %}
{% set layout = 'standard' %}
{% endif %}
- {% include '@Toolbox/snippet/teaser-' ~ layout ~ '.html.twig' %}
+ {% include '@Toolbox/snippet/teaser_' ~ layout ~ '.html.twig' %}
{% else %}
{# "teaser-standard" is the snippet name. define your teaser layout in the specific teaser snippet! #}
{{ pimcore_snippet('teaser-standard', {'useLightBox' : pimcore_checkbox('use_light_box').isChecked()}) }}
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-asset.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_asset.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-asset.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_asset.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-vimeo.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_vimeo.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-vimeo.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_vimeo.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-youtube.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_youtube.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type-youtube.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/type_youtube.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/view.html.twig
index 00f15267..1c257939 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/bootstrap4/video/view.html.twig
@@ -14,7 +14,7 @@
{% else %}
- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type-' ~ videoType) %}
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type_' ~ videoType) %}
{% endif %}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/accordion/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/accordion/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/accordion/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/anchor/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/anchor/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/anchor/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/columns/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/columns/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/columns/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/container/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/container/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/container/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/content/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/content/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/content/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/download/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/download/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/download/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/gallery/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/gallery/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/gallery/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/google_map/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/google_map/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/google_map/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/headline/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/headline/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/headline/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/iframe/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/iframe/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/iframe/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/image/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/image/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/image/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/link_list/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/link_list/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/link_list/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/parallax_container/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/parallax_container/view.html.twig
new file mode 100644
index 00000000..b4413cbc
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/parallax_container/view.html.twig
@@ -0,0 +1 @@
+{# not supported #}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/separator/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/separator/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/separator/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/slide_columns/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/slide_columns/view.html.twig
new file mode 100644
index 00000000..b4413cbc
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/slide_columns/view.html.twig
@@ -0,0 +1 @@
+{# not supported #}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/spacer/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/spacer/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/spacer/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/teaser/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/teaser/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/teaser/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/headless/video/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/headless/video/view.html.twig
new file mode 100644
index 00000000..25c45456
--- /dev/null
+++ b/src/ToolboxBundle/Resources/views/toolbox/headless/video/view.html.twig
@@ -0,0 +1 @@
+{{ editmode ? inlineConfigElements|raw : '' }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion-tab/accordion.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion_tab/accordion.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion-tab/accordion.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion_tab/accordion.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion-tab/tab.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion_tab/tab.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion-tab/tab.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/accordion_tab/tab.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/view.html.twig
index 4519a4d6..45406986 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/uikit3/accordion/view.html.twig
@@ -1 +1 @@
-{% include toolbox_area_path(areaId, areaTemplateDirectory, '/accordion-tab/' ~ (pimcore_select('component').data == 'tab' ? 'tab' : 'accordion')) %}
\ No newline at end of file
+{% include toolbox_area_path(areaId, areaTemplateDirectory, '/accordion_tab/' ~ (pimcore_select('component').data == 'tab' ? 'tab' : 'accordion')) %}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/content/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/content/view.html.twig
index 97bc5037..3b1c6ff9 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/uikit3/content/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/uikit3/content/view.html.twig
@@ -1 +1 @@
-{{ pimcore_wysiwyg('wysiwyg', {'width' : '100%', 'customConfig' : toolbox_get_ckeditor_config_path()}) }}
\ No newline at end of file
+{{ pimcore_wysiwyg('wysiwyg', {'width' : '100%'}) }}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/google-map/info-window.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/google_map/info_window.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/google-map/info-window.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/google_map/info_window.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/google-map/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/google_map/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/google-map/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/google_map/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/link-list/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/link_list/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/link-list/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/link_list/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/slide-columns/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/slide_columns/view.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/slide-columns/view.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/slide_columns/view.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/teaser/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/teaser/view.html.twig
index 69836885..729fb91a 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/uikit3/teaser/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/uikit3/teaser/view.html.twig
@@ -4,7 +4,7 @@
{% if layout is empty %}
{% set layout = 'standard' %}
{% endif %}
- {% include '@Toolbox/snippet/teaser-' ~ layout ~ '.html.twig' %}
+ {% include '@Toolbox/snippet/teaser_' ~ layout ~ '.html.twig' %}
{% else %}
{# "teaser-standard" is the snippet name. define your teaser layout in the specific teaser snippet! #}
{{ pimcore_snippet('teaser-standard', {'useLightBox' : pimcore_checkbox('use_light_box').isChecked()}) }}
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-asset.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_asset.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-asset.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_asset.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-vimeo.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_vimeo.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-vimeo.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_vimeo.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-youtube.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_youtube.html.twig
similarity index 100%
rename from src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type-youtube.html.twig
rename to src/ToolboxBundle/Resources/views/toolbox/uikit3/video/type_youtube.html.twig
diff --git a/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/view.html.twig b/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/view.html.twig
index 5410d037..8117c4d0 100644
--- a/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/view.html.twig
+++ b/src/ToolboxBundle/Resources/views/toolbox/uikit3/video/view.html.twig
@@ -18,6 +18,6 @@
{% include toolbox_area_path(areaId, areaTemplateDirectory, '/partial/overlay') with {'posterPath' : posterPath, 'playInLightbox': playInLightbox} %}
{% endif %}
- {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type-' ~ videoType) %}
+ {% include toolbox_area_path(areaId, areaTemplateDirectory, 'type_' ~ videoType) %}
{% endif %}
\ No newline at end of file
diff --git a/src/ToolboxBundle/Service/AssetService.php b/src/ToolboxBundle/Service/AssetService.php
new file mode 100644
index 00000000..6a8fb763
--- /dev/null
+++ b/src/ToolboxBundle/Service/AssetService.php
@@ -0,0 +1,158 @@
+getThumbnail($thumbnailName);
+
+ return $this->buildAssetData($image->getImage(), $thumbnail, $thumbnailOptions);
+ }
+
+ public function generateImageThumbnail(Asset\Image $asset, ?string $thumbnailName, array $thumbnailOptions = []): array
+ {
+ $thumbnail = $asset->getThumbnail($thumbnailName);
+
+ return $this->buildAssetData($asset, $thumbnail, $thumbnailOptions);
+ }
+
+ private function buildAssetData(Asset $asset, Image\Thumbnail $thumbnail, array $options): array
+ {
+ $title = $asset->getMetadata('title');
+ $description = $asset->getMetadata('description');
+ $copyright = $asset->getMetadata('copyright');
+
+ return [
+ 'title' => $title,
+ 'description' => $description,
+ 'copyright' => $copyright,
+ 'markup' => $thumbnail->getHtml($options),
+ 'mediaList' => $this->parseThumbnailPictureList($thumbnail, $options),
+ 'path' => $thumbnail->getFrontendPath(),
+ 'lowQualityPlaceholder' => $this->parseLowQualityPlaceholder($asset),
+ ];
+ }
+
+ private function parseLowQualityPlaceholder(Asset\Image $asset): string
+ {
+ $emptyGif = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
+
+ return $asset->getLowQualityPreviewDataUri() ?: $emptyGif;
+ }
+
+ private function parseThumbnailPictureList(Asset\Image\Thumbnail $thumbnail, array $thumbnailOptions): array
+ {
+ $image = $thumbnail->getAsset();
+ $thumbConfig = $thumbnail->getConfig();
+ $mediaConfigs = $thumbConfig->getMedias();
+
+ $isAutoFormat = $thumbConfig instanceof Config && strtolower($thumbConfig->getFormat()) === 'source';
+
+ ksort($mediaConfigs, SORT_NUMERIC);
+ $mediaConfigs[] = $thumbConfig->getItems();
+
+ $data = [];
+
+ foreach ($mediaConfigs as $mediaQuery => $config) {
+
+ $thumbConfig->setItems($config);
+ $sourceAttributes = $this->getSourceTagAttributes($thumbnail, $thumbConfig, $mediaQuery, $image, $thumbnailOptions);
+
+ if (empty($sourceAttributes)) {
+ continue;
+ }
+
+ if (!$isAutoFormat) {
+ continue;
+ }
+
+ foreach ($thumbConfig->getAutoFormatThumbnailConfigs() as $autoFormatConfig) {
+ $autoFormatThumbnailAttributes = $this->getSourceTagAttributes($thumbnail, $autoFormatConfig, $mediaQuery, $image, $thumbnailOptions);
+ if (!empty($autoFormatThumbnailAttributes)) {
+ $data[] = $autoFormatThumbnailAttributes;
+ }
+ }
+
+ $data[] = $sourceAttributes;
+ }
+
+ return $data;
+
+ }
+
+ private function getSourceTagAttributes(Asset\Image\Thumbnail $thumbnail, Config $thumbConfig, mixed $mediaQuery, Image $image, array $options): array
+ {
+ $sourceTagAttributes = [];
+ $sourceTagAttributes['srcset'] = $this->getSrcset($thumbnail->getAsset()->getFilename(), $thumbConfig, $image, $mediaQuery);
+ $thumb = $image->getThumbnail($thumbConfig, true);
+
+ if ($mediaQuery) {
+ $sourceTagAttributes['media'] = $mediaQuery;
+ $thumb->reset();
+ }
+
+ if (isset($options['previewDataUri'])) {
+ $sourceTagAttributes['data-srcset'] = $sourceTagAttributes['srcset'];
+ unset($sourceTagAttributes['srcset']);
+ }
+
+ if (!isset($options['disableWidthHeightAttributes'])) {
+ if ($thumb->getWidth()) {
+ $sourceTagAttributes['width'] = $thumb->getWidth();
+ }
+
+ if ($thumb->getHeight()) {
+ $sourceTagAttributes['height'] = $thumb->getHeight();
+ }
+ }
+
+ $sourceTagAttributes['type'] = $thumb->getMimeType();
+
+ $sourceCallback = $options['sourceCallback'] ?? null;
+ if ($sourceCallback) {
+ $sourceTagAttributes = $sourceCallback($sourceTagAttributes);
+ }
+
+ return $sourceTagAttributes;
+ }
+
+ private function getSrcset(string $fileName, Config $thumbConfig, Image $image, mixed $mediaQuery = null): string
+ {
+ $useOriginalFile = !$thumbConfig->isRasterizeSVG() && preg_match("@\.svgz?$@", $fileName);
+
+ $srcSetValues = [];
+ foreach ([1, 2] as $highRes) {
+
+ $thumbConfigRes = clone $thumbConfig;
+
+ if ($mediaQuery) {
+ $thumbConfigRes->selectMedia($mediaQuery);
+ }
+
+ $thumbConfigRes->setHighResolution($highRes);
+ $thumb = $image->getThumbnail($thumbConfigRes, true);
+
+ $descriptor = $highRes . 'x';
+ // encode comma in thumbnail path as srcset is a comma separated list
+ $srcSetValues[] = str_replace(',', '%2C', $thumb . ' ' . $descriptor);
+
+ if ($useOriginalFile && $thumbConfig->isSvgTargetFormatPossible()) {
+ break;
+ }
+ }
+
+ return implode(', ', $srcSetValues);
+ }
+}
diff --git a/src/ToolboxBundle/Service/DataAttributeService.php b/src/ToolboxBundle/Service/DataAttributeService.php
new file mode 100644
index 00000000..f29eaa00
--- /dev/null
+++ b/src/ToolboxBundle/Service/DataAttributeService.php
@@ -0,0 +1,80 @@
+generateAttributeStack($node, $overrides, $ignoreNonExistingCoreAttributes);
+
+ if ($values === null) {
+ return '';
+ }
+
+ return $this->parseValues($values);
+ }
+
+ public function generateDataAttributesAsArray(string $node, array $overrides = [], bool $ignoreNonExistingCoreAttributes = false): array
+ {
+ $values = $this->generateAttributeStack($node, $overrides, $ignoreNonExistingCoreAttributes);
+
+ if ($values === null) {
+ return [];
+ }
+
+ return $values;
+ }
+
+ private function generateAttributeStack(string $node, array $overrides = [], bool $ignoreNonExistingCoreAttributes = false): ?array
+ {
+ $attributesNode = $this->configManager->getConfig('data_attributes');
+
+ $coreAttributesAvailable = !empty($attributesNode[$node]['values']) && is_array($attributesNode[$node]['values']);
+
+ if ($ignoreNonExistingCoreAttributes === false && $coreAttributesAvailable === false) {
+ return null;
+ }
+
+ $coreAttributes = $coreAttributesAvailable === false ? [] : $attributesNode[$node]['values'];
+
+ return array_merge($coreAttributes, $overrides);
+ }
+
+ private function parseValues(array $values): string
+ {
+ $attributes = [];
+
+ foreach ($values as $key => $value) {
+ //continue if real empty
+ if (!is_bool($value) && (($value === 0 || $value) === false)) {
+ continue;
+ }
+
+ if (is_array($value)) {
+ $parsedValue = htmlspecialchars(json_encode($value));
+ } elseif (is_bool($value)) {
+ $parsedValue = $value ? 'true' : 'false';
+ } elseif (is_object($value)) {
+ $parsedValue = get_class($value);
+ } else {
+ $parsedValue = $value;
+ }
+
+ $attributes[] = 'data-' . $this->lineToDash($key) . '="' . $parsedValue . '"';
+ }
+
+ return implode(' ', $attributes);
+ }
+
+ private function lineToDash(string $input): string
+ {
+ return preg_replace('/_/', '-', $input);
+ }
+}
diff --git a/src/ToolboxBundle/Service/DownloadInfoService.php b/src/ToolboxBundle/Service/DownloadInfoService.php
new file mode 100644
index 00000000..07ee79cb
--- /dev/null
+++ b/src/ToolboxBundle/Service/DownloadInfoService.php
@@ -0,0 +1,112 @@
+bundleConnector->hasBundle('MembersBundle') === true &&
+ $this->bundleConnector->getBundleService(\MembersBundle\Manager\RestrictionManager::class)->elementIsInProtectedStorageFolder($download)
+ ) {
+ $dPath = $this->bundleConnector->getBundleService(\MembersBundle\Security\RestrictionUri::class)->generateAssetUrl($download);
+ } else {
+ $dPath = $download->getFullPath();
+ }
+
+ if ($fileSizeUnit === 'optimized') {
+ $realSize = $download->getFileSize();
+ $dSize = $this->getOptimizedFileSize($realSize, $fileSizePrecision);
+ } else {
+ $dSize = $download->getFileSize($fileSizeUnit, $fileSizePrecision);
+ }
+
+ $dType = pathinfo($download->getFilename(), PATHINFO_EXTENSION);
+ $downloadTitle = $showFileNameIfTitleEmpty ? $download->getFilename() : $this->translator->trans('Download', [], 'admin');
+ $dName = ($download->getMetadata('title')) ?: $downloadTitle;
+ $dAltText = $download->getMetadata('alt') ?: '';
+ $dImageAltText = !empty($dAltText) ? $dAltText : $dName;
+
+ $dPreviewImage = null;
+ $previewThumbName = $this->configManager->getImageThumbnailFromConfig('download_preview_thumbnail');
+
+ if ($showPreviewImage) {
+ $metaPreviewImage = $download->getMetadata('previewImage');
+ /** @phpstan-ignore-next-line */
+ if ($metaPreviewImage instanceof Asset\Image) {
+ $dPreviewImage = $metaPreviewImage->getThumbnail($previewThumbName);
+ } elseif ($download instanceof Asset\Image) {
+ $dPreviewImage = $download->getThumbnail($previewThumbName);
+ } elseif ($download instanceof Asset\Document) {
+ $dPreviewImage = $download->getImageThumbnail($previewThumbName);
+ }
+ }
+
+ $dPreviewImagePath = null;
+ $hasPreviewImage = false;
+
+ if ($dPreviewImage instanceof Asset\Image\Thumbnail) {
+ $dPreviewImagePath = $dPreviewImage->getPath();
+ $hasPreviewImage = true;
+ } elseif ($dPreviewImage instanceof Asset\Document\ImageThumbnail && !empty($dPreviewImage->getConfig())) {
+ $dPreviewImagePath = $dPreviewImage->getPath();
+ $hasPreviewImage = true;
+ }
+
+ return [
+ 'path' => $dPath,
+ 'size' => $dSize,
+ 'type' => $dType,
+ 'name' => $dName,
+ 'altText' => $dAltText,
+ 'imageAltText' => $dImageAltText,
+ 'previewImage' => $dPreviewImage,
+ 'hasPreviewImage' => $hasPreviewImage,
+ 'previewImagePath' => $dPreviewImagePath
+ ];
+ }
+
+ public function getOptimizedFileSize(mixed $bytes, int $precision): string
+ {
+ if ($bytes >= 1073741824) {
+ $bytes = number_format($bytes / 1073741824, 2);
+ $format = 'gb';
+ } elseif ($bytes >= 1048576) {
+ $bytes = number_format($bytes / 1048576, 2);
+ $format = 'mb';
+ } elseif ($bytes >= 1024) {
+ $bytes = number_format($bytes / 1024, 2);
+ $format = 'kb';
+ } elseif ($bytes > 1) {
+ $format = 'bytes';
+ } elseif ($bytes === 1) {
+ $format = 'byte';
+ } else {
+ $format = 'bytes';
+ }
+
+ return round((float) $bytes, $precision) . ' ' . $format;
+ }
+}
diff --git a/src/ToolboxBundle/Tool/Install.php b/src/ToolboxBundle/Tool/Install.php
index ea22c6a2..15904ba6 100644
--- a/src/ToolboxBundle/Tool/Install.php
+++ b/src/ToolboxBundle/Tool/Install.php
@@ -38,7 +38,6 @@ private function installDocumentTypes(): void
$skipInstall = false;
$elementName = 'Teaser Snippet';
- /** @var DocType $type */
foreach ($list->getDocTypes() as $type) {
if ($type->getName() === $elementName) {
$skipInstall = true;
diff --git a/src/ToolboxBundle/ToolboxBundle.php b/src/ToolboxBundle/ToolboxBundle.php
index 991b540f..9b17ea77 100644
--- a/src/ToolboxBundle/ToolboxBundle.php
+++ b/src/ToolboxBundle/ToolboxBundle.php
@@ -9,7 +9,9 @@
use ToolboxBundle\DependencyInjection\Compiler\AreaBrickAutoloadWatcherPass;
use ToolboxBundle\DependencyInjection\Compiler\AreaBrickRegistryPass;
use ToolboxBundle\DependencyInjection\Compiler\CalculatorRegistryPass;
+use ToolboxBundle\DependencyInjection\Compiler\EditableHandlerPass;
use ToolboxBundle\DependencyInjection\Compiler\MembersBundlePass;
+use ToolboxBundle\DependencyInjection\Compiler\NormalizerRegistryPass;
use ToolboxBundle\DependencyInjection\Compiler\StoreProviderPass;
use ToolboxBundle\Tool\Install;
@@ -19,16 +21,15 @@ class ToolboxBundle extends AbstractPimcoreBundle
public const PACKAGE_NAME = 'dachcom-digital/toolbox';
- /**
- * {@inheritdoc}
- */
- public function build(ContainerBuilder $container)
+ public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new AreaBrickRegistryPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 255);
$container->addCompilerPass(new AreaBrickAutoloadWatcherPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -255);
+ $container->addCompilerPass(new EditableHandlerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -255);
$container->addCompilerPass(new MembersBundlePass());
$container->addCompilerPass(new CalculatorRegistryPass());
$container->addCompilerPass(new StoreProviderPass());
+ $container->addCompilerPass(new NormalizerRegistryPass());
}
public function getInstaller(): Install
@@ -36,46 +37,8 @@ public function getInstaller(): Install
return $this->container->get(Install::class);
}
- public function getJsPaths(): array
- {
- return [
- '/admin/toolbox-ckeditor-object-style.js',
- '/bundles/toolbox/js/toolbox-ckeditor-plugins.js',
- '/bundles/toolbox/js/document/edit.js'
- ];
- }
-
- public function getEditmodeJsPaths(): array
- {
- return [
- '/bundles/toolbox/js/toolbox-ckeditor-plugins.js',
- '/bundles/toolbox/js/document/editables/areablock.js',
- '/bundles/toolbox/js/document/editables/googlemap.js',
- '/bundles/toolbox/js/document/editables/parallaximage.js',
- '/bundles/toolbox/js/document/editables/columnadjuster.js',
- '/bundles/toolbox/js/document/editables/vhs.js',
- '/bundles/toolbox/js/document/editables/vhs/editor.js',
- ];
- }
-
- public function getEditmodeCssPaths(): array
- {
- return [
- '/bundles/toolbox/css/admin.css',
- '/bundles/toolbox/css/admin_uikit.css'
- ];
- }
-
protected function getComposerPackageName(): string
{
return self::PACKAGE_NAME;
}
-
- /**
- * @return string
- */
- protected static function getPimcoreVersion()
- {
- return preg_replace('/[^0-9.]/', '', \Pimcore\Version::getVersion());
- }
}
diff --git a/src/ToolboxBundle/ToolboxConfig.php b/src/ToolboxBundle/ToolboxConfig.php
index c259599e..87e38c50 100644
--- a/src/ToolboxBundle/ToolboxConfig.php
+++ b/src/ToolboxBundle/ToolboxConfig.php
@@ -4,7 +4,7 @@
final class ToolboxConfig
{
- public const TOOLBOX_TYPES = [
+ public const TOOLBOX_AREA_TYPES = [
'accordion',
'anchor',
'columns',
@@ -26,38 +26,4 @@ final class ToolboxConfig
'teaser',
'video'
];
-
- public const CORE_TYPES = [
- 'areablock',
- 'area',
- 'block',
- 'checkbox',
- 'date',
- 'href',
- 'image',
- 'input',
- 'link',
- 'multihref',
- 'multiselect',
- 'numeric',
- 'embed',
- 'pdf',
- 'relation',
- 'relations',
- 'renderlet',
- 'select',
- 'snippet',
- 'table',
- 'textarea',
- 'video',
- 'wysiwyg'
- ];
-
- public const CUSTOM_TYPES = [
- 'additionalClasses',
- 'additionalClassesChained',
- 'parallaximage',
- 'googlemap',
- 'vhs',
- ];
}
diff --git a/src/ToolboxBundle/ToolboxEvents.php b/src/ToolboxBundle/ToolboxEvents.php
new file mode 100644
index 00000000..9e95bde1
--- /dev/null
+++ b/src/ToolboxBundle/ToolboxEvents.php
@@ -0,0 +1,13 @@
+configManager = $configManager;
- $this->areaManager = $areaManager;
}
public function getFunctions(): array
diff --git a/src/ToolboxBundle/Twig/Extension/CkEditorExtension.php b/src/ToolboxBundle/Twig/Extension/CkEditorExtension.php
deleted file mode 100644
index 8d87702f..00000000
--- a/src/ToolboxBundle/Twig/Extension/CkEditorExtension.php
+++ /dev/null
@@ -1,30 +0,0 @@
- true
- ])
- ];
- }
-
- public function getConfigPath(array $context): string
- {
- $document = $context['document'];
- $documentId = 0;
- if ($document instanceof Document) {
- $documentId = $document->getId();
- }
-
- return sprintf('/admin/toolbox-ckeditor-style.js?tb_document_request_id=%s', $documentId);
- }
-}
diff --git a/src/ToolboxBundle/Twig/Extension/DataAttributesExtension.php b/src/ToolboxBundle/Twig/Extension/DataAttributesExtension.php
index 960dbcae..f6f4d0a6 100644
--- a/src/ToolboxBundle/Twig/Extension/DataAttributesExtension.php
+++ b/src/ToolboxBundle/Twig/Extension/DataAttributesExtension.php
@@ -2,90 +2,21 @@
namespace ToolboxBundle\Twig\Extension;
-use ToolboxBundle\Manager\ConfigManagerInterface;
+use ToolboxBundle\Service\DataAttributeService;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
class DataAttributesExtension extends AbstractExtension
{
- protected ConfigManagerInterface $configManager;
-
- public function __construct(ConfigManagerInterface $configManager)
+ public function __construct(protected DataAttributeService $dataAttributeService)
{
- $this->configManager = $configManager;
}
public function getFunctions(): array
{
return [
- new TwigFunction('toolbox_data_attributes_generator', [$this, 'generateDataAttributes']),
+ new TwigFunction('toolbox_data_attributes_generator', [$this->dataAttributeService, 'generateDataAttributes']),
];
}
- /**
- * @param string $node
- * @param array $overrides
- * @param bool $ignoreNonExistingCoreAttributes
- *
- * @return string
- *
- * @throws \Exception
- */
- public function generateDataAttributes($node, $overrides = [], $ignoreNonExistingCoreAttributes = false)
- {
- $attributesNode = $this->configManager->getConfig('data_attributes');
-
- $coreAttributesAvailable = isset($attributesNode[$node]['values']) && is_array($attributesNode[$node]['values']) && !empty($attributesNode[$node]['values']);
-
- if ($ignoreNonExistingCoreAttributes === false && $coreAttributesAvailable === false) {
- return '';
- }
-
- $coreAttributes = $coreAttributesAvailable === false ? [] : $attributesNode[$node]['values'];
-
- $values = array_merge($coreAttributes, $overrides);
-
- return $this->parseValues($values);
- }
-
- /**
- * @param array $values
- *
- * @return string
- */
- private function parseValues($values)
- {
- $attributes = [];
-
- foreach ($values as $key => $value) {
- //continue if real empty
- if (!is_bool($value) && (($value === 0 || $value) === false)) {
- continue;
- }
-
- if (is_array($value)) {
- $parsedValue = htmlspecialchars(json_encode($value));
- } elseif (is_bool($value)) {
- $parsedValue = $value ? 'true' : 'false';
- } elseif (is_object($value)) {
- $parsedValue = get_class($value);
- } else {
- $parsedValue = $value;
- }
-
- $attributes[] = 'data-' . $this->lineToDash($key) . '="' . $parsedValue . '"';
- }
-
- return implode(' ', $attributes);
- }
-
- /**
- * @param string $input
- *
- * @return mixed
- */
- private function lineToDash($input)
- {
- return preg_replace('/_/', '-', $input);
- }
}
diff --git a/src/ToolboxBundle/Twig/Extension/DownloadExtension.php b/src/ToolboxBundle/Twig/Extension/DownloadExtension.php
index 1b4cadaf..18bbf417 100644
--- a/src/ToolboxBundle/Twig/Extension/DownloadExtension.php
+++ b/src/ToolboxBundle/Twig/Extension/DownloadExtension.php
@@ -2,11 +2,8 @@
namespace ToolboxBundle\Twig\Extension;
-use Pimcore\File;
-use Pimcore\Model\Asset;
-use ToolboxBundle\Connector\BundleConnector;
-use Pimcore\Translation\Translator;
use ToolboxBundle\Manager\ConfigManagerInterface;
+use ToolboxBundle\Service\DownloadInfoService;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
@@ -14,20 +11,15 @@ class DownloadExtension extends AbstractExtension
{
public function __construct(
protected ConfigManagerInterface $configManager,
- protected BundleConnector $bundleConnector,
- protected Translator $translator
+ protected DownloadInfoService $downloadInfoService
) {
}
public function getFunctions(): array
{
return [
- new TwigFunction('toolbox_download_info', [$this, 'getDownloadInfo']),
- new TwigFunction(
- 'toolbox_download_tracker',
- [$this, 'getDownloadTracker'],
- ['is_safe' => ['html']]
- )
+ new TwigFunction('toolbox_download_info', [$this->downloadInfoService, 'getDownloadInfo']),
+ new TwigFunction('toolbox_download_tracker', [$this, 'getDownloadTracker'], ['is_safe' => ['html']])
];
}
@@ -43,7 +35,7 @@ public function getDownloadTracker(mixed $areaType, mixed $element = null): stri
if (is_array($areaType)) {
$trackerInfo = $areaType;
} else {
- $configNode = $this->configManager->setAreaNameSpace(ConfigManagerInterface::AREABRICK_NAMESPACE_INTERNAL)->getAreaParameterConfig($areaType);
+ $configNode = $this->configManager->getAreaParameterConfig($areaType);
if (empty($configNode) || !isset($configNode['event_tracker'])) {
return '';
@@ -75,98 +67,4 @@ public function getDownloadTracker(mixed $areaType, mixed $element = null): stri
return $str;
}
-
- /**
- * @throws \Exception
- */
- public function getDownloadInfo(
- Asset $download,
- bool $showPreviewImage = false,
- string $fileSizeUnit = 'optimized',
- int $fileSizePrecision = 0,
- bool $showFileNameIfTitleEmpty = false
- ): array {
-
- if (
- $this->bundleConnector->hasBundle('MembersBundle') === true &&
- $this->bundleConnector->getBundleService(\MembersBundle\Manager\RestrictionManager::class)->elementIsInProtectedStorageFolder($download)
- ) {
- $dPath = $this->bundleConnector->getBundleService(\MembersBundle\Security\RestrictionUri::class)->generateAssetUrl($download);
- } else {
- $dPath = $download->getFullPath();
- }
-
- if ($fileSizeUnit === 'optimized') {
- $realSize = $download->getFileSize();
- $dSize = $this->getOptimizedFileSize($realSize, $fileSizePrecision);
- } else {
- $dSize = $download->getFileSize($fileSizeUnit, $fileSizePrecision);
- }
-
- $dType = File::getFileExtension($download->getFilename());
- $downloadTitle = $showFileNameIfTitleEmpty ? $download->getFilename() : $this->translator->trans('Download', [], 'admin');
- $dName = ($download->getMetadata('title')) ?: $downloadTitle;
- $dAltText = $download->getMetadata('alt') ?: '';
- $dImageAltText = !empty($dAltText) ? $dAltText : $dName;
-
- $dPreviewImage = null;
- $previewThumbName = $this->configManager->getImageThumbnailFromConfig('download_preview_thumbnail');
-
- if ($showPreviewImage) {
- $metaPreviewImage = $download->getMetadata('previewImage');
- /** @phpstan-ignore-next-line */
- if ($metaPreviewImage instanceof Asset\Image) {
- $dPreviewImage = $metaPreviewImage->getThumbnail($previewThumbName);
- } elseif ($download instanceof Asset\Image) {
- $dPreviewImage = $download->getThumbnail($previewThumbName);
- } elseif ($download instanceof Asset\Document) {
- $dPreviewImage = $download->getImageThumbnail($previewThumbName);
- }
- }
-
- $dPreviewImagePath = null;
- $hasPreviewImage = false;
-
- if ($dPreviewImage instanceof Asset\Image\Thumbnail) {
- $dPreviewImagePath = $dPreviewImage->getPath();
- $hasPreviewImage = true;
- } elseif ($dPreviewImage instanceof Asset\Document\ImageThumbnail && !empty($dPreviewImage->getConfig())) {
- $dPreviewImagePath = $dPreviewImage->getPath();
- $hasPreviewImage = true;
- }
-
- return [
- 'path' => $dPath,
- 'size' => $dSize,
- 'type' => $dType,
- 'name' => $dName,
- 'altText' => $dAltText,
- 'imageAltText' => $dImageAltText,
- 'previewImage' => $dPreviewImage,
- 'hasPreviewImage' => $hasPreviewImage,
- 'previewImagePath' => $dPreviewImagePath
- ];
- }
-
- public function getOptimizedFileSize(mixed $bytes, int $precision): string
- {
- if ($bytes >= 1073741824) {
- $bytes = number_format($bytes / 1073741824, 2);
- $format = 'gb';
- } elseif ($bytes >= 1048576) {
- $bytes = number_format($bytes / 1048576, 2);
- $format = 'mb';
- } elseif ($bytes >= 1024) {
- $bytes = number_format($bytes / 1024, 2);
- $format = 'kb';
- } elseif ($bytes > 1) {
- $format = 'bytes';
- } elseif ($bytes === 1) {
- $format = 'byte';
- } else {
- $format = 'bytes';
- }
-
- return round((float) $bytes, $precision) . ' ' . $format;
- }
}
diff --git a/src/ToolboxBundle/Twig/Extension/GoogleAPIKeysExtension.php b/src/ToolboxBundle/Twig/Extension/GoogleAPIKeysExtension.php
index 36491f25..4f0e43de 100644
--- a/src/ToolboxBundle/Twig/Extension/GoogleAPIKeysExtension.php
+++ b/src/ToolboxBundle/Twig/Extension/GoogleAPIKeysExtension.php
@@ -8,15 +8,10 @@
class GoogleAPIKeysExtension extends AbstractExtension
{
- protected ?string $fallbackBrowserKey;
- protected ConfigManagerInterface $configManager;
-
public function __construct(
- ?string $fallbackBrowserKey,
- ConfigManagerInterface $configManager
+ protected ?string $fallbackBrowserKey,
+ protected ConfigManagerInterface $configManager
) {
- $this->fallbackBrowserKey = $fallbackBrowserKey;
- $this->configManager = $configManager;
}
public function getFunctions(): array
@@ -27,16 +22,14 @@ public function getFunctions(): array
}
/**
- * @return mixed
- *
* @throws \Exception
*/
- public function getGoogleMapAPIKey()
+ public function getGoogleMapAPIKey(): mixed
{
$browserKey = 'please_configure_key_in_systemsettings';
- $configNode = $this->configManager->setAreaNameSpace(ConfigManagerInterface::AREABRICK_NAMESPACE_INTERNAL)->getAreaParameterConfig('googleMap');
+ $configNode = $this->configManager->getAreaParameterConfig('googleMap');
- if (!empty($configNode) && isset($configNode['map_api_key']) && !empty($configNode['map_api_key'])) {
+ if (!empty($configNode) && !empty($configNode['map_api_key'])) {
return $configNode['map_api_key'];
}
diff --git a/src/ToolboxBundle/Twig/Extension/ImageThumbnailExtension.php b/src/ToolboxBundle/Twig/Extension/ImageThumbnailExtension.php
index e2c34732..bf4069d1 100644
--- a/src/ToolboxBundle/Twig/Extension/ImageThumbnailExtension.php
+++ b/src/ToolboxBundle/Twig/Extension/ImageThumbnailExtension.php
@@ -8,11 +8,8 @@
class ImageThumbnailExtension extends AbstractExtension
{
- protected ConfigManagerInterface $configManager;
-
- public function __construct(ConfigManagerInterface $configManager)
+ public function __construct(protected ConfigManagerInterface $configManager)
{
- $this->configManager = $configManager;
}
public function getFunctions(): array
@@ -23,13 +20,9 @@ public function getFunctions(): array
}
/**
- * @param null $thumbnailName
- *
- * @return mixed
- *
* @throws \Exception
*/
- public function getImageThumbnail($thumbnailName = null)
+ public function getImageThumbnail(string $thumbnailName): ?string
{
return $this->configManager->getImageThumbnailFromConfig($thumbnailName);
}
diff --git a/src/ToolboxBundle/Twig/Extension/LayoutExtension.php b/src/ToolboxBundle/Twig/Extension/LayoutExtension.php
index 99c5cb15..f019cbff 100644
--- a/src/ToolboxBundle/Twig/Extension/LayoutExtension.php
+++ b/src/ToolboxBundle/Twig/Extension/LayoutExtension.php
@@ -8,11 +8,8 @@
class LayoutExtension extends AbstractExtension
{
- protected LayoutManager $layoutManager;
-
- public function __construct(LayoutManager $layoutManager)
+ public function __construct(protected LayoutManager $layoutManager)
{
- $this->layoutManager = $layoutManager;
}
public function getFunctions(): array
diff --git a/tests/AcceptanceDefault.suite.dist.yml b/tests/AcceptanceDefault.suite.dist.yml
new file mode 100644
index 00000000..68f19580
--- /dev/null
+++ b/tests/AcceptanceDefault.suite.dist.yml
@@ -0,0 +1,21 @@
+actor: AcceptanceTester
+error_level: '%PIMCORE_PHP_ERROR_REPORTING%'
+modules:
+ config:
+ \Dachcom\Codeception\Support\Helper\Browser\WebDriver:
+ host: '%WEBDRIVER_HOST%'
+ url: '%WEBDRIVER_URL%'
+ browser: chrome
+ port: 4444
+ restart: true
+ enabled:
+ - \Dachcom\Codeception\Support\Helper\PimcoreCore:
+ part: SERVICES
+ connect_db: true
+ rebootable_client: true
+ - \Dachcom\Codeception\Support\Helper\PimcoreBundleCore:
+ run_installer: true
+ - \DachcomBundle\Test\Support\Helper\Toolbox
+ - \Dachcom\Codeception\Support\Helper\Browser\WebDriver
+ - \Dachcom\Codeception\Support\Helper\PimcoreBackend
+ - \Dachcom\Codeception\Support\Helper\PimcoreUser
\ No newline at end of file
diff --git a/tests/acceptance.default/AreaPositionCest.php b/tests/AcceptanceDefault/AreaPositionCest.php
similarity index 96%
rename from tests/acceptance.default/AreaPositionCest.php
rename to tests/AcceptanceDefault/AreaPositionCest.php
index 7c35ef64..11b75ff8 100644
--- a/tests/acceptance.default/AreaPositionCest.php
+++ b/tests/AcceptanceDefault/AreaPositionCest.php
@@ -2,13 +2,11 @@
namespace DachcomBundle\Test\AcceptanceDefault;
-use DachcomBundle\Test\AcceptanceTester;
+use DachcomBundle\Test\Support\AcceptanceTester;
class AreaPositionCest
{
/**
- * @param AcceptanceTester $I
- *
* @throws \Exception
*/
public function testAreaButtonsPosition(AcceptanceTester $I)
diff --git a/tests/acceptance.default/_bootstrap.php b/tests/AcceptanceDefault/_bootstrap.php
similarity index 100%
rename from tests/acceptance.default/_bootstrap.php
rename to tests/AcceptanceDefault/_bootstrap.php
diff --git a/tests/FunctionalDefault.suite.dist.yml b/tests/FunctionalDefault.suite.dist.yml
new file mode 100644
index 00000000..696491a2
--- /dev/null
+++ b/tests/FunctionalDefault.suite.dist.yml
@@ -0,0 +1,15 @@
+actor: FunctionalTester
+error_level: '%PIMCORE_PHP_ERROR_REPORTING%'
+modules:
+ enabled:
+ - \Dachcom\Codeception\Support\Helper\PimcoreCore:
+ connect_db: true
+ rebootable_client: true
+ - \Dachcom\Codeception\Support\Helper\PimcoreBundleCore:
+ run_installer: true
+ - \Dachcom\Codeception\Support\Helper\Browser\PhpBrowser:
+ depends: \Dachcom\Codeception\Support\Helper\PimcoreCore
+ - \Dachcom\Codeception\Support\Helper\PimcoreAdminJson:
+ depends: \Dachcom\Codeception\Support\Helper\PimcoreCore
+ - \Dachcom\Codeception\Support\Helper\PimcoreBackend
+ - \Dachcom\Codeception\Support\Helper\PimcoreUser
\ No newline at end of file
diff --git a/tests/functional.default/Controller/AdminColumnAdjusterControllerCest.php b/tests/FunctionalDefault/Controller/AdminColumnAdjusterControllerCest.php
similarity index 99%
rename from tests/functional.default/Controller/AdminColumnAdjusterControllerCest.php
rename to tests/FunctionalDefault/Controller/AdminColumnAdjusterControllerCest.php
index 975c7766..9df6d39c 100644
--- a/tests/functional.default/Controller/AdminColumnAdjusterControllerCest.php
+++ b/tests/FunctionalDefault/Controller/AdminColumnAdjusterControllerCest.php
@@ -2,13 +2,10 @@
namespace DachcomBundle\Test\FunctionalDefault\Controller;
-use DachcomBundle\Test\FunctionalTester;
+use DachcomBundle\Test\Support\FunctionalTester;
class AdminColumnAdjusterControllerCest
{
- /**
- * @param FunctionalTester $I
- */
public function testToolboxColumnInfoWithoutCustomInfo(FunctionalTester $I)
{
$I->haveAUser('dachcom_test');
diff --git a/tests/functional.default/Controller/AjaxControllerCest.php b/tests/FunctionalDefault/Controller/AjaxControllerCest.php
similarity index 93%
rename from tests/functional.default/Controller/AjaxControllerCest.php
rename to tests/FunctionalDefault/Controller/AjaxControllerCest.php
index 69b9b2d9..40340406 100644
--- a/tests/functional.default/Controller/AjaxControllerCest.php
+++ b/tests/FunctionalDefault/Controller/AjaxControllerCest.php
@@ -2,13 +2,10 @@
namespace DachcomBundle\Test\FunctionalDefault\Controller;
-use DachcomBundle\Test\FunctionalTester;
+use DachcomBundle\Test\Support\FunctionalTester;
class AjaxControllerCest
{
- /**
- * @param FunctionalTester $I
- */
public function testGoogleMapInfoWindow(FunctionalTester $I)
{
$query = [
diff --git a/tests/functional.default/Controller/SnippetControllerCest.php b/tests/FunctionalDefault/Controller/SnippetControllerCest.php
similarity index 95%
rename from tests/functional.default/Controller/SnippetControllerCest.php
rename to tests/FunctionalDefault/Controller/SnippetControllerCest.php
index f3f984cb..9b94c48b 100644
--- a/tests/functional.default/Controller/SnippetControllerCest.php
+++ b/tests/FunctionalDefault/Controller/SnippetControllerCest.php
@@ -2,13 +2,10 @@
namespace DachcomBundle\Test\FunctionalDefault\Controller;
-use DachcomBundle\Test\FunctionalTester;
+use DachcomBundle\Test\Support\FunctionalTester;
class SnippetControllerCest
{
- /**
- * @param FunctionalTester $I
- */
public function testSnippetController(FunctionalTester $I)
{
$snippetParams = [
diff --git a/tests/functional.default/_bootstrap.php b/tests/FunctionalDefault/_bootstrap.php
similarity index 100%
rename from tests/functional.default/_bootstrap.php
rename to tests/FunctionalDefault/_bootstrap.php
diff --git a/tests/Support/AcceptanceTester.php b/tests/Support/AcceptanceTester.php
new file mode 100644
index 00000000..8c034363
--- /dev/null
+++ b/tests/Support/AcceptanceTester.php
@@ -0,0 +1,8 @@
+setupRequest(['mock_toolbox_context' => 'disabled']);
/** @var ConfigManagerInterface $configManager */
$configManager = $this->getContainer()->get(ConfigManager::class);
- $ckEditorSettings = $configManager->getConfig('ckeditor');
+ $wysiwygSettings = $configManager->getConfig('wysiwyg_editor');
- $this->assertArrayHasKey('config', $ckEditorSettings);
- $this->assertArrayHasKey('global_style_sets', $ckEditorSettings);
- $globalStyleSets = $ckEditorSettings['global_style_sets'];
-
- $this->assertArrayHasKey('default', $globalStyleSets);
+ $this->assertArrayHasKey('config', $wysiwygSettings);
+ $this->assertArrayHasKey('style_formats', $wysiwygSettings['config']);
+ $styleFormats = $wysiwygSettings['config']['style_formats'];
$data = [
[
- 'name' => 'Lead Global',
- 'element' => 'p',
- 'attributes' => ['class' => 'lead'],
+ 'title' => 'Lead Global',
+ 'selector' => 'p',
+ 'classes' => 'lead',
]
];
- $this->assertEquals($data, $globalStyleSets['default']);
+ $this->assertEquals($data, $styleFormats);
}
/**
* @throws \Codeception\Exception\ModuleException
*/
- public function testCkEditorSettingsOnContextConfiguration()
+ public function testWysiwygEditorSettingsOnContextConfiguration()
{
$this->setupRequest(['mock_toolbox_context' => 'context_a']);
/** @var ConfigManagerInterface $configManager */
$configManager = $this->getContainer()->get(ConfigManager::class);
- $ckEditorSettings = $configManager->getConfig('ckeditor');
-
- $this->assertArrayHasKey('config', $ckEditorSettings);
- $this->assertArrayHasKey('global_style_sets', $ckEditorSettings);
- $globalStyleSets = $ckEditorSettings['global_style_sets'];
+ $wysiwygSettings = $configManager->getConfig('wysiwyg_editor');
- $this->assertArrayHasKey('default', $globalStyleSets);
+ $this->assertArrayHasKey('config', $wysiwygSettings);
+ $this->assertArrayHasKey('style_formats', $wysiwygSettings['config']);
+ $styleFormats = $wysiwygSettings['config']['style_formats'];
$data = [
[
- 'name' => 'Lead For Portal1',
- 'element' => 'p',
- 'attributes' => ['class' => 'lead-portal']
+ 'title' => 'Lead For Portal1',
+ 'selector' => 'p',
+ 'classes' => 'lead-portal'
],
[
- 'name' => 'Dark Grey',
- 'element' => 'h1',
- 'attributes' => ['class' => 'grey-1']
+ 'title' => 'Dark Grey',
+ 'selector' => 'h1',
+ 'classes' => 'grey-1'
]
];
- $this->assertEquals($data, $globalStyleSets['default']);
+ $this->assertEquals($data, $styleFormats);
}
/**
@@ -159,7 +155,6 @@ public function testThemeGridOnContextConfiguration()
}
-
/**
* @param array $query
*
diff --git a/tests/unit.context/_bootstrap.php b/tests/UnitContext/_bootstrap.php
similarity index 100%
rename from tests/unit.context/_bootstrap.php
rename to tests/UnitContext/_bootstrap.php
diff --git a/tests/UnitDefault.suite.dist.yml b/tests/UnitDefault.suite.dist.yml
new file mode 100644
index 00000000..3ac1420f
--- /dev/null
+++ b/tests/UnitDefault.suite.dist.yml
@@ -0,0 +1,9 @@
+actor: UnitTester
+error_level: '%PIMCORE_PHP_ERROR_REPORTING%'
+modules:
+ enabled:
+ - \Dachcom\Codeception\Support\Helper\PimcoreCore:
+ connect_db: true
+ - \Dachcom\Codeception\Support\Helper\PimcoreBundleCore:
+ run_installer: true
+ - \Dachcom\Codeception\Support\Helper\Unit
\ No newline at end of file
diff --git a/tests/unit.default/Areas/AbstractAreaTest.php b/tests/UnitDefault/Areas/AbstractAreaTest.php
similarity index 85%
rename from tests/unit.default/Areas/AbstractAreaTest.php
rename to tests/UnitDefault/Areas/AbstractAreaTest.php
index 619e5522..44389e49 100644
--- a/tests/unit.default/Areas/AbstractAreaTest.php
+++ b/tests/UnitDefault/Areas/AbstractAreaTest.php
@@ -3,11 +3,11 @@
namespace DachcomBundle\Test\UnitDefault\Areas;
use Codeception\Exception\ModuleException;
-use Dachcom\Codeception\Test\BundleTestCase;
+use Dachcom\Codeception\Support\Test\BundleTestCase;
use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration;
use Pimcore\Model\Document\Editable;
use Pimcore\Model\Document\Editable\Area;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
use Symfony\Component\HttpFoundation\Request;
use ToolboxBundle\Builder\BrickConfigBuilder;
use ToolboxBundle\Manager\ConfigManager;
@@ -16,15 +16,11 @@
abstract class AbstractAreaTest extends BundleTestCase
{
/**
- * @return object|ConfigManager
* @throws ModuleException
*/
- public function getToolboxConfig()
+ public function getToolboxConfig(): ConfigManager
{
- $configManager = $this->getContainer()->get(ConfigManager::class);
- $configManager->setAreaNameSpace(ConfigManagerInterface::AREABRICK_NAMESPACE_INTERNAL);
-
- return $configManager;
+ return $this->getContainer()->get(ConfigManager::class);
}
/**
@@ -108,12 +104,11 @@ public function generateBackendArea($id)
$builder = $this->getContainer()->get(BrickConfigBuilder::class);
$configManager = $this->getContainer()->get(ConfigManager::class);
- $configManager->setAreaNameSpace(ConfigManagerInterface::AREABRICK_NAMESPACE_INTERNAL);
$configNode = $configManager->getAreaConfig($info->getId());
$themeOptions = $configManager->getConfig('theme');
- return $builder->buildDialogBoxConfiguration($info, $info->getId(), $configNode, $themeOptions)->getItems();
+ return $builder->buildConfiguration($info, $info->getId(), $configNode, $themeOptions)->getItems();
}
/**
diff --git a/tests/unit.default/Areas/AccordionTest.php b/tests/UnitDefault/Areas/AccordionTest.php
similarity index 100%
rename from tests/unit.default/Areas/AccordionTest.php
rename to tests/UnitDefault/Areas/AccordionTest.php
diff --git a/tests/unit.default/Areas/AnchorTest.php b/tests/UnitDefault/Areas/AnchorTest.php
similarity index 100%
rename from tests/unit.default/Areas/AnchorTest.php
rename to tests/UnitDefault/Areas/AnchorTest.php
diff --git a/tests/unit.default/Areas/ColumnsTest.php b/tests/UnitDefault/Areas/ColumnsTest.php
similarity index 100%
rename from tests/unit.default/Areas/ColumnsTest.php
rename to tests/UnitDefault/Areas/ColumnsTest.php
diff --git a/tests/unit.default/Areas/ContainerTest.php b/tests/UnitDefault/Areas/ContainerTest.php
similarity index 100%
rename from tests/unit.default/Areas/ContainerTest.php
rename to tests/UnitDefault/Areas/ContainerTest.php
diff --git a/tests/unit.default/Areas/ContentTest.php b/tests/UnitDefault/Areas/ContentTest.php
similarity index 100%
rename from tests/unit.default/Areas/ContentTest.php
rename to tests/UnitDefault/Areas/ContentTest.php
diff --git a/tests/unit.default/Areas/DownloadTest.php b/tests/UnitDefault/Areas/DownloadTest.php
similarity index 99%
rename from tests/unit.default/Areas/DownloadTest.php
rename to tests/UnitDefault/Areas/DownloadTest.php
index 4dde35af..ed57d2f3 100644
--- a/tests/unit.default/Areas/DownloadTest.php
+++ b/tests/UnitDefault/Areas/DownloadTest.php
@@ -5,7 +5,7 @@
use Pimcore\Model\Document\Editable\Checkbox;
use Pimcore\Model\Document\Editable\Relations;
use Pimcore\Model\Document\Editable\Select;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
class DownloadTest extends AbstractAreaTest
{
diff --git a/tests/unit.default/Areas/GalleryTest.php b/tests/UnitDefault/Areas/GalleryTest.php
similarity index 99%
rename from tests/unit.default/Areas/GalleryTest.php
rename to tests/UnitDefault/Areas/GalleryTest.php
index 336f75b6..c57d4d25 100644
--- a/tests/unit.default/Areas/GalleryTest.php
+++ b/tests/UnitDefault/Areas/GalleryTest.php
@@ -5,7 +5,7 @@
use Pimcore\Model\Document\Editable\Checkbox;
use Pimcore\Model\Document\Editable\Relations;
use Pimcore\Model\Document\Editable\Select;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
class GalleryTest extends AbstractAreaTest
{
diff --git a/tests/unit.default/Areas/GoogleMapTest.php b/tests/UnitDefault/Areas/GoogleMapTest.php
similarity index 98%
rename from tests/unit.default/Areas/GoogleMapTest.php
rename to tests/UnitDefault/Areas/GoogleMapTest.php
index 9040aefd..5212c548 100644
--- a/tests/unit.default/Areas/GoogleMapTest.php
+++ b/tests/UnitDefault/Areas/GoogleMapTest.php
@@ -70,7 +70,7 @@ public function testGoogleMap()
$googleMapElement->setDataFromEditmode($locations);
$mapZoom = new Numeric();
- $mapZoom->setDataFromResource(5);
+ $mapZoom->setDataFromResource('5');
$mapType = new Select();
$mapType->setDataFromResource('roadmap');
@@ -116,7 +116,7 @@ public function testGoogleMapWidthAdditionalClass()
$googleMapElement->setDataFromEditmode($locations);
$mapZoom = new Numeric();
- $mapZoom->setDataFromResource(12);
+ $mapZoom->setDataFromResource('12');
$mapType = new Select();
$mapType->setDataFromResource('satellite');
diff --git a/tests/unit.default/Areas/HeadlineTest.php b/tests/UnitDefault/Areas/HeadlineTest.php
similarity index 100%
rename from tests/unit.default/Areas/HeadlineTest.php
rename to tests/UnitDefault/Areas/HeadlineTest.php
diff --git a/tests/unit.default/Areas/IframeTest.php b/tests/UnitDefault/Areas/IframeTest.php
similarity index 98%
rename from tests/unit.default/Areas/IframeTest.php
rename to tests/UnitDefault/Areas/IframeTest.php
index 9c5ed044..8f2f1582 100644
--- a/tests/unit.default/Areas/IframeTest.php
+++ b/tests/UnitDefault/Areas/IframeTest.php
@@ -49,7 +49,7 @@ public function testIframeWithHeight()
$url->setDataFromResource('https://www.dachcom.com');
$height = new Numeric();
- $height->setDataFromResource(200);
+ $height->setDataFromResource('200');
$elements = [
'url' => $url,
diff --git a/tests/unit.default/Areas/ImageTest.php b/tests/UnitDefault/Areas/ImageTest.php
similarity index 98%
rename from tests/unit.default/Areas/ImageTest.php
rename to tests/UnitDefault/Areas/ImageTest.php
index 166b32d8..0c1cc020 100644
--- a/tests/unit.default/Areas/ImageTest.php
+++ b/tests/UnitDefault/Areas/ImageTest.php
@@ -6,7 +6,7 @@
use Pimcore\Model\Document\Editable\Image;
use Pimcore\Model\Document\Editable\Link;
use Pimcore\Model\Document\Editable\Select;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
class ImageTest extends AbstractAreaTest
{
@@ -104,7 +104,7 @@ public function testImageWithLink()
$imageTag->setText('caption');
$link = new Link();
- $link->setDataFromResource(['path' => '/test/test2']);
+ $link->setDataFromResource(serialize(['path' => '/test/test2']));
$elements = [
'ci' => $imageTag,
diff --git a/tests/unit.default/Areas/LinkListTest.php b/tests/UnitDefault/Areas/LinkListTest.php
similarity index 100%
rename from tests/unit.default/Areas/LinkListTest.php
rename to tests/UnitDefault/Areas/LinkListTest.php
diff --git a/tests/unit.default/Areas/ParallaxContainerSectionTest.php b/tests/UnitDefault/Areas/ParallaxContainerSectionTest.php
similarity index 100%
rename from tests/unit.default/Areas/ParallaxContainerSectionTest.php
rename to tests/UnitDefault/Areas/ParallaxContainerSectionTest.php
diff --git a/tests/unit.default/Areas/ParallaxContainerTest.php b/tests/UnitDefault/Areas/ParallaxContainerTest.php
similarity index 95%
rename from tests/unit.default/Areas/ParallaxContainerTest.php
rename to tests/UnitDefault/Areas/ParallaxContainerTest.php
index faf343b3..fbf1abc5 100644
--- a/tests/unit.default/Areas/ParallaxContainerTest.php
+++ b/tests/UnitDefault/Areas/ParallaxContainerTest.php
@@ -2,7 +2,7 @@
namespace DachcomBundle\Test\UnitDefault\Areas;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
use Pimcore\Model\Document\Editable;
use ToolboxBundle\Model\Document\Editable\ParallaxImage;
@@ -175,8 +175,8 @@ private function getCompare(\Pimcore\Model\Asset\Image $asset)
return '
';
@@ -208,8 +208,8 @@ private function getCompareWithAdditionalClass(\Pimcore\Model\Asset\Image $asset
return '
';
diff --git a/tests/unit.default/Areas/SeparatorTest.php b/tests/UnitDefault/Areas/SeparatorTest.php
similarity index 100%
rename from tests/unit.default/Areas/SeparatorTest.php
rename to tests/UnitDefault/Areas/SeparatorTest.php
diff --git a/tests/unit.default/Areas/SlideColumnsTest.php b/tests/UnitDefault/Areas/SlideColumnsTest.php
similarity index 99%
rename from tests/unit.default/Areas/SlideColumnsTest.php
rename to tests/UnitDefault/Areas/SlideColumnsTest.php
index 740d0fef..5fd2a282 100644
--- a/tests/unit.default/Areas/SlideColumnsTest.php
+++ b/tests/UnitDefault/Areas/SlideColumnsTest.php
@@ -129,7 +129,7 @@ public function testSlideColumnsWithBreakPoints()
'controlsAlign' => 'top',
'controlsTrigger' => 'hover',
],
- 'areas_appearance' => [],
+ 'areablock_restriction' => [],
]);
$elements = [
diff --git a/tests/unit.default/Areas/SpacerTest.php b/tests/UnitDefault/Areas/SpacerTest.php
similarity index 100%
rename from tests/unit.default/Areas/SpacerTest.php
rename to tests/UnitDefault/Areas/SpacerTest.php
diff --git a/tests/unit.default/Areas/TeaserSnippetTest.php b/tests/UnitDefault/Areas/TeaserSnippetTest.php
similarity index 100%
rename from tests/unit.default/Areas/TeaserSnippetTest.php
rename to tests/UnitDefault/Areas/TeaserSnippetTest.php
diff --git a/tests/unit.default/Areas/TeaserTest.php b/tests/UnitDefault/Areas/TeaserTest.php
similarity index 97%
rename from tests/unit.default/Areas/TeaserTest.php
rename to tests/UnitDefault/Areas/TeaserTest.php
index 6bd94d41..cf1c99a9 100644
--- a/tests/unit.default/Areas/TeaserTest.php
+++ b/tests/UnitDefault/Areas/TeaserTest.php
@@ -8,7 +8,7 @@
use Pimcore\Model\Document\Editable\Link;
use Pimcore\Model\Document\Editable\Select;
use Pimcore\Model\Document\Editable\Wysiwyg;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
class TeaserTest extends AbstractAreaTest
{
@@ -89,7 +89,7 @@ private function getDefaultElements($asset)
$layout->setDataFromResource('default');
$link = new Link();
- $link->setDataFromResource(['path' => '/test/test2', 'linktype' => 'direct', 'text' => '']);
+ $link->setDataFromResource(serialize(['path' => '/test/test2', 'linktype' => 'direct', 'text' => '']));
$image = new Image();
$image->setDataFromEditmode([
diff --git a/tests/unit.default/Areas/VideoTest.php b/tests/UnitDefault/Areas/VideoTest.php
similarity index 99%
rename from tests/unit.default/Areas/VideoTest.php
rename to tests/UnitDefault/Areas/VideoTest.php
index c35dc43a..f94bbb3a 100644
--- a/tests/unit.default/Areas/VideoTest.php
+++ b/tests/UnitDefault/Areas/VideoTest.php
@@ -4,7 +4,7 @@
use Pimcore\Model\Document\Editable\Checkbox;
use Pimcore\Model\Document\Editable\Select;
-use Pimcore\Tests\Util\TestHelper;
+use Pimcore\Tests\Support\Util\TestHelper;
use ToolboxBundle\Model\Document\Editable\Vhs;
class VideoTest extends AbstractAreaTest
diff --git a/tests/unit.default/_bootstrap.php b/tests/UnitDefault/_bootstrap.php
similarity index 100%
rename from tests/unit.default/_bootstrap.php
rename to tests/UnitDefault/_bootstrap.php
diff --git a/tests/UnitTheme.suite.dist.yml b/tests/UnitTheme.suite.dist.yml
new file mode 100644
index 00000000..28589d69
--- /dev/null
+++ b/tests/UnitTheme.suite.dist.yml
@@ -0,0 +1,10 @@
+actor: UnitTester
+error_level: '%PIMCORE_PHP_ERROR_REPORTING%'
+modules:
+ enabled:
+ - \Dachcom\Codeception\Support\Helper\PimcoreCore:
+ configuration_file: 'config_theme.yaml'
+ connect_db: true
+ - \Dachcom\Codeception\Support\Helper\PimcoreBundleCore:
+ run_installer: true
+ - \Dachcom\Codeception\Support\Helper\Unit
\ No newline at end of file
diff --git a/tests/unit.theme/AreaManagerTest.php b/tests/UnitTheme/AreaManagerTest.php
similarity index 97%
rename from tests/unit.theme/AreaManagerTest.php
rename to tests/UnitTheme/AreaManagerTest.php
index 2ace9125..67f7962c 100644
--- a/tests/unit.theme/AreaManagerTest.php
+++ b/tests/UnitTheme/AreaManagerTest.php
@@ -2,8 +2,8 @@
namespace DachcomBundle\Test\UnitTheme;
+use Dachcom\Codeception\Support\Test\BundleTestCase;
use Symfony\Component\HttpFoundation\Request;
-use Dachcom\Codeception\Test\BundleTestCase;
use ToolboxBundle\Manager\AreaManager;
use ToolboxBundle\Manager\AreaManagerInterface;
diff --git a/tests/unit.theme/ColumnCalculatorTest.php b/tests/UnitTheme/ColumnCalculatorTest.php
similarity index 99%
rename from tests/unit.theme/ColumnCalculatorTest.php
rename to tests/UnitTheme/ColumnCalculatorTest.php
index aa171f78..f81f3cd9 100644
--- a/tests/unit.theme/ColumnCalculatorTest.php
+++ b/tests/UnitTheme/ColumnCalculatorTest.php
@@ -2,7 +2,7 @@
namespace DachcomBundle\Test\UnitTheme;
-use Dachcom\Codeception\Test\BundleTestCase;
+use Dachcom\Codeception\Support\Test\BundleTestCase;
use ToolboxBundle\Calculator\ColumnCalculatorInterface;
class ColumnCalculatorTest extends BundleTestCase
diff --git a/tests/unit.theme/_bootstrap.php b/tests/UnitTheme/_bootstrap.php
similarity index 100%
rename from tests/unit.theme/_bootstrap.php
rename to tests/UnitTheme/_bootstrap.php
diff --git a/tests/_bootstrap.php b/tests/_bootstrap.php
index f4138acf..fc47a3e5 100644
--- a/tests/_bootstrap.php
+++ b/tests/_bootstrap.php
@@ -1,8 +1,3 @@
[
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "downloadPreviewImage",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1604413615,
- "creationDate" => 1604413601,
- "forcePictureTag" => FALSE,
- "id" => "downloadPreviewImage"
- ],
- "parallaxImage" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "parallaxImage",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => NULL,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632325543,
- "creationDate" => 1632325543,
- "preserveAnimation" => FALSE,
- "id" => "parallaxImage"
- ],
- "parallaxSectionBackground" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "parallaxSectionBackground",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "parallaxSectionBackground"
- ],
- "lightBoxImage" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "lightBoxImage",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "lightBoxImage"
- ],
- "videoPoster" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "videoPoster",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "videoPoster"
- ],
- "standardTeaser" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "standardTeaser",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "standardTeaser"
- ],
- "contentImage" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "contentImage",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "contentImage"
- ],
- "galleryImage" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "galleryImage",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "galleryImage"
- ],
- "galleryThumb" => [
- "items" => [
- [
- "method" => "scaleByWidth",
- "arguments" => [
- "width" => 500,
- "forceResize" => FALSE
- ]
- ]
- ],
- "medias" => [
-
- ],
- "name" => "galleryThumb",
- "description" => "",
- "group" => "",
- "format" => "JPEG",
- "quality" => 85,
- "highResolution" => 0.0,
- "preserveColor" => FALSE,
- "preserveMetaData" => FALSE,
- "rasterizeSVG" => FALSE,
- "downloadable" => FALSE,
- "modificationDate" => 1632481410,
- "creationDate" => 1632406242,
- "preserveAnimation" => FALSE,
- "id" => "galleryThumb"
- ],
-];
diff --git a/tests/_etc/config/app/image_thumbnails/contentImage.yaml b/tests/_etc/config/app/image_thumbnails/contentImage.yaml
new file mode 100644
index 00000000..1084888a
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/contentImage.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ contentImage:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: contentImage
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/downloadPreviewImage.yaml b/tests/_etc/config/app/image_thumbnails/downloadPreviewImage.yaml
new file mode 100755
index 00000000..e53c6645
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/downloadPreviewImage.yaml
@@ -0,0 +1,26 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ downloadPreviewImage:
+ items:
+ -
+ method: scaleByWidth
+ arguments:
+ width: 500
+ forceResize: false
+ medias: { }
+ name: downloadPreviewImage
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1641460931
+ creationDate: 1604413601
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/galleryImage.yaml b/tests/_etc/config/app/image_thumbnails/galleryImage.yaml
new file mode 100644
index 00000000..68d6d977
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/galleryImage.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ galleryImage:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: galleryImage
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/galleryThumb.yaml b/tests/_etc/config/app/image_thumbnails/galleryThumb.yaml
new file mode 100644
index 00000000..d06940df
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/galleryThumb.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ galleryThumb:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: galleryThumb
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/lightBoxImage.yaml b/tests/_etc/config/app/image_thumbnails/lightBoxImage.yaml
new file mode 100644
index 00000000..d658af62
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/lightBoxImage.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ lightBoxImage:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: lightBoxImage
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/parallaxImage.yaml b/tests/_etc/config/app/image_thumbnails/parallaxImage.yaml
new file mode 100755
index 00000000..ee49d52a
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/parallaxImage.yaml
@@ -0,0 +1,21 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ parallaxImage:
+ items: { }
+ medias: { }
+ name: parallaxImage
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1641460931
+ creationDate: 1632325543
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/parallaxSectionBackground.yaml b/tests/_etc/config/app/image_thumbnails/parallaxSectionBackground.yaml
new file mode 100644
index 00000000..beb7f9e5
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/parallaxSectionBackground.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ parallaxSectionBackground:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: parallaxSectionBackground
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/standardTeaser.yaml b/tests/_etc/config/app/image_thumbnails/standardTeaser.yaml
new file mode 100644
index 00000000..8f3e0782
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/standardTeaser.yaml
@@ -0,0 +1,24 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ standardTeaser:
+ items:
+ -
+ method: grayscale
+ arguments: { }
+ medias: { }
+ name: standardTeaser
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684761377
+ creationDate: 1684761361
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/image_thumbnails/videoPoster.yaml b/tests/_etc/config/app/image_thumbnails/videoPoster.yaml
new file mode 100644
index 00000000..a4c68a61
--- /dev/null
+++ b/tests/_etc/config/app/image_thumbnails/videoPoster.yaml
@@ -0,0 +1,26 @@
+pimcore:
+ assets:
+ image:
+ thumbnails:
+ definitions:
+ videoPoster:
+ items:
+ -
+ method: resize
+ arguments:
+ width: 800
+ height: 600
+ medias: { }
+ name: videoPoster
+ description: ''
+ group: ''
+ format: SOURCE
+ quality: 85
+ highResolution: 0.0
+ preserveColor: false
+ preserveMetaData: false
+ rasterizeSVG: false
+ downloadable: false
+ modificationDate: 1684751200
+ creationDate: 1684751193
+ preserveAnimation: false
diff --git a/tests/_etc/config/app/system.yml b/tests/_etc/config/app/system.yml
deleted file mode 100755
index 45732b19..00000000
--- a/tests/_etc/config/app/system.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-pimcore:
- general:
- timezone: Europe/Berlin
- language: en
- valid_languages: 'en,de'
- fallback_languages:
- en: ''
- de: ''
- path_variable: ''
- domain: 'localhost'
- redirect_to_maindomain: false
- default_language: en
- disable_usage_statistics: true
- debug_admin_translations: false
- instance_identifier: ''
- documents:
- versions:
- steps: 10
- days: null
- error_pages:
- default: /404
- allow_trailing_slash: 'no'
- generate_preview: false
- objects:
- versions:
- steps: 10
- days: null
- assets:
- versions:
- steps: 10
- days: null
- icc_rgb_profile: ''
- icc_cmyk_profile: ''
- hide_edit_image: false
- disable_tree_preview: true
- services:
- google:
- client_id: ''
- email: ''
- simple_api_key: ''
- browser_api_key: ''
- full_page_cache:
- exclude_cookie: ''
- enabled: false
- lifetime: null
- exclude_patterns: ''
- httpclient:
- adapter: Socket
- proxy_host: ''
- proxy_port: ''
- proxy_user: ''
- proxy_pass: ''
- applicationlog:
- mail_notification:
- send_log_summary: false
- filter_priority: null
- mail_receiver: ''
- archive_treshold: '30'
- archive_alternative_database: ''
- delete_archive_threshold: '6'
-pimcore_admin:
- branding:
- color_login_screen: ''
- color_admin_interface: ''
- login_screen_custom_image: ''
- login_screen_invert_colors: false
diff --git a/tests/_etc/config/app/system_settings.yaml b/tests/_etc/config/app/system_settings.yaml
new file mode 100755
index 00000000..52951c74
--- /dev/null
+++ b/tests/_etc/config/app/system_settings.yaml
@@ -0,0 +1,47 @@
+pimcore:
+ general:
+ timezone: Europe/Berlin
+ domain: 'localhost'
+ redirect_to_maindomain: false
+ disable_usage_statistics: true
+ debug_admin_translations: false
+ language: en
+ default_language: en
+ valid_languages:
+ - en
+ - de
+ fallback_languages:
+ en: ''
+ de: ''
+ documents:
+ allow_trailing_slash: 'no'
+ generate_preview: false
+ versions:
+ days: null
+ steps: 10
+ error_pages:
+ default: '/error'
+ localized:
+ en: ''
+ de: ''
+ objects:
+ versions:
+ days: null
+ steps: 10
+ assets:
+ versions:
+ days: null
+ steps: 10
+ email:
+ debug:
+ email_addresses: shagspiel@dachcom.ch
+pimcore_admin:
+ assets:
+ hide_edit_image: true
+ disable_tree_preview: true
+ branding:
+ login_screen_invert_colors: false
+ color_login_screen: ''
+ color_admin_interface: ''
+ color_admin_interface_background: ''
+ login_screen_custom_image: ''
diff --git a/tests/_etc/config/bundle/config_context.yml b/tests/_etc/config/bundle/config_context.yaml
similarity index 53%
rename from tests/_etc/config/bundle/config_context.yml
rename to tests/_etc/config/bundle/config_context.yaml
index 1f49f887..d6c1f651 100755
--- a/tests/_etc/config/bundle/config_context.yml
+++ b/tests/_etc/config/bundle/config_context.yaml
@@ -1,31 +1,51 @@
toolbox:
- ckeditor:
- global_style_sets:
- default:
- - name: 'Lead Global'
- element: p
- attributes:
- class: 'lead'
+ enabled_core_areas:
+ - accordion
+ - anchor
+ - columns
+ - container
+ - content
+ - download
+ - gallery
+ - googleMap
+ - headline
+ - iFrame
+ - image
+ - linkList
+ - parallaxContainer
+ - parallaxContainerSection
+ - separator
+ - slideColumns
+ - snippet
+ - spacer
+ - teaser
+ - video
- context_resolver: 'DachcomBundle\Test\Services\ContextResolverTestClass'
+ wysiwyg_editor:
+ config:
+ style_formats:
+ - title: 'Lead Global'
+ classes: 'lead'
+ selector: 'p'
+
+ context_resolver: 'DachcomBundle\Test\Support\Services\ContextResolverTestClass'
context:
context_a:
settings:
merge_with_root: true
enabled_areas:
- 'headline'
- ckeditor:
- global_style_sets:
- default:
- - name: 'Lead For Portal1'
- element: p
- attributes:
- class: 'lead-portal'
- - name: 'Dark Grey'
- element: h1
- attributes:
- class: 'grey-1'
+ wysiwyg_editor:
+ config:
+ style_formats:
+ - title: 'Lead For Portal1'
+ classes: 'lead-portal'
+ selector: 'p'
+ - title: 'Dark Grey'
+ classes: 'grey-1'
+ selector: 'h1'
+
context_b:
settings:
merge_with_root: true
@@ -52,6 +72,10 @@ toolbox:
settings:
merge_with_root: false
theme:
+ layout: !php/const ToolboxBundle\Manager\LayoutManagerInterface::TOOLBOX_LAYOUT_BOOTSTRAP4
+ calculators:
+ column_calculator: ToolboxBundle\Calculator\Bootstrap4\ColumnCalculator
+ slide_calculator: ToolboxBundle\Calculator\Bootstrap4\SlideColumnCalculator
grid:
grid_size: 8
breakpoints:
diff --git a/tests/_etc/config/bundle/config_default.yml b/tests/_etc/config/bundle/config_default.yaml
similarity index 59%
rename from tests/_etc/config/bundle/config_default.yml
rename to tests/_etc/config/bundle/config_default.yaml
index 0e38536b..6563c61b 100755
--- a/tests/_etc/config/bundle/config_default.yml
+++ b/tests/_etc/config/bundle/config_default.yaml
@@ -1,4 +1,27 @@
toolbox:
+
+ enabled_core_areas:
+ - accordion
+ - anchor
+ - columns
+ - container
+ - content
+ - download
+ - gallery
+ - googleMap
+ - headline
+ - iFrame
+ - image
+ - linkList
+ - parallaxContainer
+ - parallaxContainerSection
+ - separator
+ - slideColumns
+ - snippet
+ - spacer
+ - teaser
+ - video
+
theme:
grid:
grid_size: 12
diff --git a/tests/_etc/config/bundle/config_theme.yml b/tests/_etc/config/bundle/config_theme.yaml
similarity index 67%
rename from tests/_etc/config/bundle/config_theme.yml
rename to tests/_etc/config/bundle/config_theme.yaml
index 2d17aca9..3d1b8399 100755
--- a/tests/_etc/config/bundle/config_theme.yml
+++ b/tests/_etc/config/bundle/config_theme.yaml
@@ -1,4 +1,27 @@
toolbox:
+
+ enabled_core_areas:
+ - accordion
+ - anchor
+ - columns
+ - container
+ - content
+ - download
+ - gallery
+ - googleMap
+ - headline
+ - iFrame
+ - image
+ - linkList
+ - parallaxContainer
+ - parallaxContainerSection
+ - separator
+ - slideColumns
+ - snippet
+ - spacer
+ - teaser
+ - video
+
theme:
grid:
grid_size: 12
@@ -19,7 +42,8 @@ toolbox:
identifier: 'lg'
name: 'Breakpoint: LG'
description: 'Your Description'
- areas_appearance:
+
+ areablock_restriction:
disallowed_content:
disallowed:
- image
@@ -31,7 +55,8 @@ toolbox:
- image
disallowed:
- image
- snippet_areas_appearance:
+
+ snippet_areablock_restriction:
disallowed_content:
disallowed:
- headline
diff --git a/tests/_output/.gitignore b/tests/_output/.gitignore
deleted file mode 100644
index c96a04f0..00000000
--- a/tests/_output/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
\ No newline at end of file
diff --git a/tests/_phpstan-bootstrap.php b/tests/_phpstan-bootstrap.php
index 0c3c5270..dea88192 100644
--- a/tests/_phpstan-bootstrap.php
+++ b/tests/_phpstan-bootstrap.php
@@ -3,4 +3,4 @@
# prevent php warnings in phpstan.
if (!defined('PIMCORE_PRIVATE_VAR')) {
define('PIMCORE_PRIVATE_VAR', '');
-}
\ No newline at end of file
+}
diff --git a/tests/_support/AcceptanceTester.php b/tests/_support/AcceptanceTester.php
deleted file mode 100644
index 5df874f7..00000000
--- a/tests/_support/AcceptanceTester.php
+++ /dev/null
@@ -1,8 +0,0 @@
-