$options */
30 | public function getLinkForCode(string $code, array $options = []): string;
31 | }
32 |
--------------------------------------------------------------------------------
/src/Twig/Runtime/ResolveMediaVideoPathRuntimeInterface.php:
--------------------------------------------------------------------------------
1 |
4 | {{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
5 | {% if hookable_metadata.configuration.method is defined %}
6 |
7 | {% endif %}
8 | {{ form_errors(form) }}
9 | {{ form_widget(form._token) }}
10 |
11 | {% hook 'form' with { form } %}
12 |
13 | {{ form_end(form, {render_rest: false}) }}
14 |
15 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% hook 'sections' %}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/collections.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 |
5 | {{ form_row(form.collections, sylius_test_form_attribute('collection-autocomplete')) }}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/content.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | {% hook 'content' %}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/content/template.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.template, sylius_test_form_attribute('template')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/content/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 | {% form_theme form '@SyliusCmsPlugin/admin/shared/component_elements/form_theme.html.twig' %}
7 |
8 | {{ translations.with_hook(form.contentElements, prefixes, null, { accordion_flush: true, accordion_id: 'elements' }) }}
9 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/content/translations/elements.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 |
{{ 'sylius_cms.ui.elements'|trans }}
5 | {{ form_row(form.contentElements, {label: false}) }}
6 | {{ form_row(form.contentElements.vars.button_add) }}
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/content/translations/elements_template.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form.template %}
2 |
3 | {% form_theme form '@SyliusCmsPlugin/admin/block/form_theme.html.twig' %}
4 |
5 | {{ form_row(form, sylius_test_form_attribute('elements-template')) }}
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/display_config.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | {% hook 'display_config' %}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/display_config/products.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.products, sylius_test_form_attribute('products')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/display_config/products_in_taxons.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.productsInTaxons, sylius_test_form_attribute('products-in-taxons')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/display_config/taxons.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.taxons, sylius_test_form_attribute('taxons')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/general.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% hook 'general' %}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/general/channels.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.channels, sylius_test_form_attribute('channels')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/general/code.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.code, sylius_test_form_attribute('code')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/general/enabled.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.enabled, sylius_test_form_attribute('enabled')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/form/sections/general/name.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.name, sylius_test_form_attribute('name')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/block/preview.html.twig:
--------------------------------------------------------------------------------
1 | {% extends '@SyliusShop/shared/layout/base.html.twig' %}
2 |
3 | {% block metatags %}
4 |
5 |
6 | {{ parent() }}
7 | {% endblock %}
8 |
9 | {% block content %}
10 | {% if template_exists(resource) %}
11 |
12 | {% include resource.template %}
13 |
14 | {% else %}
15 | {% include '@SyliusCmsPlugin/admin/shared/preview/missing_template.html.twig' %}
16 |
17 | {% include constant('Sylius\\CmsPlugin\\Provider\\ResourceTemplateProvider::DEFAULT_TEMPLATE_BLOCK') %}
18 |
19 | {% endif %}
20 | {% endblock %}
21 |
--------------------------------------------------------------------------------
/templates/admin/collection/form.html.twig:
--------------------------------------------------------------------------------
1 | {% form_theme form '@SyliusAdmin/shared/form_theme.html.twig' %}
2 |
3 |
4 | {{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
5 | {% if hookable_metadata.configuration.method is defined %}
6 |
7 | {% endif %}
8 | {{ form_errors(form) }}
9 | {{ form_widget(form._token) }}
10 |
11 | {% hook 'form' with { form } %}
12 |
13 | {{ form_end(form, {render_rest: false}) }}
14 |
15 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'sections' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/elements.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% hook 'elements' %}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/elements/collection_elements.html.twig:
--------------------------------------------------------------------------------
1 | {% set selected_element = hookable_metadata.context.form.type.vars.value %}
2 | {% set field_map = {
3 | 'page': 'pages',
4 | 'block': 'blocks',
5 | 'media': 'media'
6 | } %}
7 | {% set selected_element = field_map[selected_element]|default('pages') %}
8 |
9 | {{ form_label(hookable_metadata.context.form[selected_element]) }}
10 | {{ form_errors(hookable_metadata.context.form[selected_element]) }}
11 |
12 |
13 |
14 | {{ form_widget(hookable_metadata.context.form[selected_element], sylius_test_form_attribute('collection-element-type')) }}
15 | {{ form_errors(hookable_metadata.context.form[selected_element]) }}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/general.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% hook 'general' %}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/general/code.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.code, sylius_test_form_attribute('code')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/general/name.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.name, sylius_test_form_attribute('name')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/collection/form/sections/general/type.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.type, sylius_test_form_attribute('type')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/channels.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% for channel in data.channels %}
3 |
4 | {% include '@SyliusAdmin/shared/grid/field/channel.html.twig' with { data: channel } %}
5 |
6 | {% endfor %}
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/collections.html.twig:
--------------------------------------------------------------------------------
1 | {% for collection in data.collections %}
2 | {{ collection.code }}
3 | {% endfor %}
4 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/content.html.twig:
--------------------------------------------------------------------------------
1 | {{ data.content|length > 25 ? data.content|slice(0, 25) ~ '...' : data.content }}
2 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/image_preview.html.twig:
--------------------------------------------------------------------------------
1 | {% if 'image' in data.mimeType %}
2 |
3 | {% else %}
4 | {{ data.mimeType }}
5 | {% endif %}
6 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/name.html.twig:
--------------------------------------------------------------------------------
1 | {% set name = data.name %}
2 | {% if name %}
3 | {{ name|length > 60 ? name|slice(0, 60) ~ '...' : name }}
4 | {% endif %}
5 |
--------------------------------------------------------------------------------
/templates/admin/grid/field/page_image.html.twig:
--------------------------------------------------------------------------------
1 | {% if data.translation.image %}
2 |
3 | {% else %}
4 |
5 | {% endif %}
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form.html.twig:
--------------------------------------------------------------------------------
1 | {% form_theme form '@SyliusAdmin/shared/form_theme.html.twig' %}
2 |
3 |
4 | {{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
5 | {% if hookable_metadata.configuration.method is defined %}
6 |
7 | {% endif %}
8 | {{ form_errors(form) }}
9 | {{ form_widget(form._token) }}
10 |
11 | {% hook 'form' with { form } %}
12 |
13 | {{ form_end(form, {render_rest: false}) }}
14 |
15 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% hook 'sections' %}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/collections.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 |
5 | {{ form_row(form.collections, sylius_test_form_attribute('collections')) }}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% hook 'general' %}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general/channels.html.twig:
--------------------------------------------------------------------------------
1 | {% set channels = hookable_metadata.context.form.channels %}
2 |
3 |
4 | {{ form_row(channels) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general/code.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.code, sylius_test_form_attribute('code')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general/enabled.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.enabled, sylius_test_form_attribute('enabled')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general/name.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.name, sylius_test_form_attribute('name')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/general/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 |
7 |
12 | {{ translations.with_hook(form.translations, prefixes, null, { accordion_flush: true }) }}
13 |
14 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | {% hook 'media' %}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media/file.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.file, sylius_test_form_attribute('file')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media/path.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.path, sylius_test_form_attribute('path')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media/preview.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media/save_with_original_filename.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.saveWithOriginalName, sylius_test_form_attribute('save-with-original-filename')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/media/type.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.type, sylius_test_form_attribute('type')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 |
7 |
12 | {{ translations.with_hook(form.translations, prefixes, null, { accordion_flush: true }) }}
13 |
14 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/translations/alt.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.alt, sylius_test_form_attribute('alt')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/translations/content.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.content, sylius_test_form_attribute('content')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/media/form/sections/translations/link.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.link, sylius_test_form_attribute('link')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/media/preview/file.html.twig:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/templates/admin/media/preview/image.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/templates/admin/media/preview/video.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/templates/admin/page/form.html.twig:
--------------------------------------------------------------------------------
1 | {% form_theme form '@SyliusCmsPlugin/admin/page/form_theme.html.twig' %}
2 |
3 |
4 | {{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
5 | {% if hookable_metadata.configuration.method is defined %}
6 |
7 | {% endif %}
8 | {{ form_errors(form) }}
9 | {{ form_widget(form._token) }}
10 |
11 | {% hook 'form' with { form } %}
12 |
13 | {{ form_end(form, {render_rest: false}) }}
14 |
15 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'sections' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/collections.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 |
5 | {{ form_row(form.collections, sylius_test_form_attribute('collections')) }}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | {% hook 'content' %}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content/fields.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'fields' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content/fields/template.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 | {{ form_row(form.template, sylius_test_form_attribute('template')) }}
4 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 | {% form_theme form '@SyliusCmsPlugin/admin/shared/component_elements/form_theme.html.twig' %}
7 |
8 | {{ translations.with_hook(form.contentElements, prefixes, null, { accordion_flush: true, accordion_id: 'elements' }) }}
9 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content/translations/elements.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 |
{{ 'sylius_cms.ui.elements'|trans }}
5 | {{ form_row(form.contentElements, {label: false}) }}
6 | {{ form_row(form.contentElements.vars.button_add) }}
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/content/translations/elements_template.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form.template %}
2 |
3 | {% form_theme form '@SyliusCmsPlugin/admin/page/form_theme.html.twig' %}
4 |
5 | {{ form_row(form, sylius_test_form_attribute('elements-template')) }}
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% hook 'general' %}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/buttons.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'buttons' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/channels.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.channels, sylius_test_form_attribute('channels')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/code.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.code, sylius_test_form_attribute('code')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/enabled.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.enabled, sylius_test_form_attribute('enabled')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/name.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.name, sylius_test_form_attribute('name')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/general/publish_at.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.publishAt, sylius_test_form_attribute('publish-at')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
7 | {% hook 'seo' %}
8 |
9 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 | {{ translations.with_hook(form.translations, prefixes, null, { accordion_flush: true, accordion_id: 'seo' }) }}
7 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo/translations/meta_description.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.metaDescription, sylius_test_form_attribute('meta-description')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo/translations/meta_keywords.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.metaKeywords, sylius_test_form_attribute('meta-keywords')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo/translations/meta_title.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.title, sylius_test_form_attribute('meta-title')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/seo/translations/slug.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 | {% form_theme form '@SyliusCmsPlugin/admin/page/form_theme.html.twig' %}
4 |
5 |
6 | {{ form_row(form.slug, sylius_test_form_attribute('slug')) }}
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/teaser.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
8 | {% hook 'teaser' %}
9 |
10 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/teaser/translations.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusAdmin/shared/helper/translations.html.twig' as translations %}
2 |
3 | {% set form = hookable_metadata.context.form %}
4 | {% set prefixes = hookable_metadata.prefixes %}
5 |
6 | {{ translations.with_hook(form.translations, prefixes, null, { accordion_flush: true, accordion_id: 'teaser' }) }}
7 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/teaser/translations/content.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.teaserContent, sylius_test_form_attribute('teaser-content')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/teaser/translations/image.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.teaserImage, sylius_test_form_attribute('teaser-image')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/form/sections/teaser/translations/title.html.twig:
--------------------------------------------------------------------------------
1 | {% set form = hookable_metadata.context.form %}
2 |
3 |
4 | {{ form_row(form.teaserTitle, sylius_test_form_attribute('teaser-title')) }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/page/link.html.twig:
--------------------------------------------------------------------------------
1 | {% if page != null %}
2 |
9 | {{ options.name|default(page.nameWhenLinked)|default(page.name) }}
10 |
11 | {% else %}
12 | {{ options.notFoundMessage|default('') }}
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/templates/admin/page/preview.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = resource %}
2 |
3 | {% if template_exists(resource) %}
4 | {% embed resource.template %}
5 | {% block metatags %}
6 |
7 |
8 | {{ parent() }}
9 | {% endblock %}
10 | {% endembed %}
11 | {% else %}
12 | {% embed constant('Sylius\\CmsPlugin\\Provider\\ResourceTemplateProvider::DEFAULT_TEMPLATE_PAGE') %}
13 |
14 | {% block metatags %}
15 |
16 |
17 | {{ parent() }}
18 | {% endblock %}
19 |
20 | {% block content %}
21 | {% include '@SyliusCmsPlugin/admin/shared/preview/missing_template.html.twig' %}
22 |
23 | {{ parent() }}
24 | {% endblock %}
25 | {% endembed %}
26 | {% endif %}
27 |
--------------------------------------------------------------------------------
/templates/admin/shared/editor/trix.html.twig:
--------------------------------------------------------------------------------
1 | {% block sylius_cms_plugin_trix_strategy_widget %}
2 | {% set uid = id|replace({'[': '_', ']': ''}) %}
3 | {% set toolbar_id = 'trix-toolbar-' ~ uid %}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {% endblock %}
12 |
--------------------------------------------------------------------------------
/templates/admin/shared/preview/missing_template.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
{{ 'sylius_cms.ui.content_preview.missing_template.title'|trans }}
5 |
6 | {{ ux_icon('tabler:x') }}
7 |
8 |
9 |
10 | {{ 'sylius_cms.ui.content_preview.missing_template.content'|trans }}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/templates/admin/template/form.html.twig:
--------------------------------------------------------------------------------
1 | {% form_theme form '@SyliusAdmin/shared/form_theme.html.twig' %}
2 |
3 |
4 | {{ form_start(form, {'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate', 'id': form.vars.id}}) }}
5 | {% if hookable_metadata.configuration.method is defined %}
6 |
7 | {% endif %}
8 | {{ form_errors(form) }}
9 | {{ form_widget(form._token) }}
10 |
11 | {% hook 'form' with { form } %}
12 |
13 | {{ form_end(form, {render_rest: false}) }}
14 |
15 |
--------------------------------------------------------------------------------
/templates/admin/template/form/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'sections' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/template/form/sections/elements.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% hook 'elements' %}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/templates/admin/template/form/sections/general.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% hook 'general' %}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/admin/template/form/sections/general/name.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.name, sylius_test_form_attribute('name')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/admin/template/form/sections/general/type.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ form_row(hookable_metadata.context.form.type, sylius_test_form_attribute('type')) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/block/show.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ content|raw }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/collection/name.html.twig:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index.html.twig:
--------------------------------------------------------------------------------
1 | {% extends '@SyliusShop/shared/layout/base.html.twig' %}
2 |
3 | {% block content %}
4 | {% hook 'sylius_cms.shop.collection.page.index' with { resources } %}
5 | {% endblock %}
6 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'content' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'body' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body/no_results.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusShop/shared/messages.html.twig' as messages %}
2 |
3 | {% set resources = hookable_metadata.context.resources %}
4 |
5 | {% if resources.data|length == 0 %}
6 | {{ messages.info('sylius.ui.no_results_to_display') }}
7 | {% endif %}
8 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body/pages.html.twig:
--------------------------------------------------------------------------------
1 | {% set resources = hookable_metadata.context.resources %}
2 |
3 | {% if resources.data|length > 0 %}
4 |
5 | {% hook 'pages' %}
6 |
7 | {% endif %}
8 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body/pages/page.html.twig:
--------------------------------------------------------------------------------
1 | {% set resources = hookable_metadata.context.resources %}
2 |
3 | {% for page in resources.data %}
4 |
5 |
6 | {% hook 'page' with { page } %}
7 |
8 |
9 | {% endfor %}
10 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body/pages/page/header.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = hookable_metadata.context.page %}
2 |
3 |
4 | {{ page.name }}
5 |
6 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/body/pagination.html.twig:
--------------------------------------------------------------------------------
1 | {% import '@SyliusShop/shared/pagination/pagination.html.twig' as pagination %}
2 |
3 | {{ pagination.simple(hookable_metadata.context.resources.data) }}
4 |
--------------------------------------------------------------------------------
/templates/shop/collection/page/index/content/header.html.twig:
--------------------------------------------------------------------------------
1 | {% set resources = hookable_metadata.context.resources %}
2 |
3 | {% if resources.data|length > 0 %}
4 |
5 | {{ render(path('sylius_cms_shop_collection_show', {'code' : app.request.get('code'), 'template' : '@SyliusCmsPlugin/shop/collection/name.html.twig'})) }}
6 |
7 | {% endif %}
8 |
--------------------------------------------------------------------------------
/templates/shop/collection/show.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ content|raw }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/heading.html.twig:
--------------------------------------------------------------------------------
1 |
2 | <{{ heading_type }}>{{ heading_content }}{{ heading_type }}>
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/multiple_media.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% for element in media %}
3 | {{ element.renderedContent }}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/products_carousel.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for product in products %}
4 |
5 |
{{ component('sylius_shop:product:card', { product: product, template: '@SyliusShop/product/common/card.html.twig' }) }}
6 |
7 | {% endfor %}
8 |
9 |
10 | {{ ux_icon('tabler:chevron-left') }}
11 |
12 |
13 | {{ ux_icon('tabler:chevron-right') }}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/products_grid.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for product in products %}
4 |
{{ component('sylius_shop:product:card', { product: product, template: '@SyliusShop/product/common/card.html.twig' }) }}
5 | {% endfor %}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/single_media.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ media.renderedContent }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/spacer.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/taxons_list.html.twig:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/templates/shop/content_element/elements/textarea.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ content }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/content_element/index.html.twig:
--------------------------------------------------------------------------------
1 | {% set content_element_base_class = 'cms_content_element' %}
2 | {% include content_element %}
3 |
--------------------------------------------------------------------------------
/templates/shop/media/show/file.html.twig:
--------------------------------------------------------------------------------
1 |
13 |
--------------------------------------------------------------------------------
/templates/shop/media/show/image.html.twig:
--------------------------------------------------------------------------------
1 |
18 |
--------------------------------------------------------------------------------
/templates/shop/media/show/video.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% if null != media.name %}
3 |
{{ media.name|raw }}
4 | {% endif %}
5 |
6 |
7 |
8 |
{{ sylius_cms_render_content(media) }}
9 |
10 |
--------------------------------------------------------------------------------
/templates/shop/page/link.html.twig:
--------------------------------------------------------------------------------
1 | {% if page != null %}
2 |
9 | {{ options.name|default(page.name) }}
10 |
11 | {% else %}
12 | {{ options.notFoundMessage|default('') }}
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/templates/shop/page/metatags/description.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = hookable_metadata.context.page %}
2 |
3 | {% if hookable_metadata.context.published == true %}
4 | {% if page.metaDescription is not empty %}
5 |
6 | {% endif %}
7 | {% endif %}
8 |
--------------------------------------------------------------------------------
/templates/shop/page/metatags/keywords.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = hookable_metadata.context.page %}
2 |
3 | {% if hookable_metadata.context.published == true %}
4 | {% if page.metaKeywords is not empty %}
5 |
6 | {% endif %}
7 | {% endif %}
8 |
--------------------------------------------------------------------------------
/templates/shop/page/show.html.twig:
--------------------------------------------------------------------------------
1 | {% extends '@SyliusShop/shared/layout/base.html.twig' %}
2 |
3 | {% set prefixes = ['sylius_cms.shop.page'] %}
4 | {% set published = (page.publishAt is not null and page.publishAt|date("Y-m-d H:i:s") < "now"|date("Y-m-d H:i:s") or page.publishAt is null) %}
5 |
6 | {%- block title -%}
7 | {% if page.title is not empty and published == true %}
8 | {{ page.title }}
9 | {% else %}
10 | {{ parent() }}
11 | {% endif %}
12 | {%- endblock -%}
13 |
14 | {% block content %}
15 | {% hook 'show' with { _prefixes: prefixes, page, published } %}
16 | {% endblock %}
17 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% if hookable_metadata.context.published == true %}
3 | {% hook 'content' %}
4 | {% else %}
5 | {% hook 'content#not_published' %}
6 | {% endif %}
7 |
8 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/body.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'body' %}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/body/content_elements.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {{ sylius_cms_render_content_elements(hookable_metadata.context.page) }}
3 |
4 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/body/header.html.twig:
--------------------------------------------------------------------------------
1 | {{ hookable_metadata.context.page.name }}
2 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/breadcrumbs.html.twig:
--------------------------------------------------------------------------------
1 | {% from '@SyliusShop/shared/breadcrumbs.html.twig' import breadcrumbs as breadcrumbs %}
2 |
3 | {{ breadcrumbs([
4 | { label: 'sylius.ui.home'|trans, path: path('sylius_shop_homepage')},
5 | { label: hookable_metadata.context.page.name, active: true }
6 | ]) }}
7 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/collections.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = hookable_metadata.context.page %}
2 |
3 | {% if page.collections is not empty %}
4 |
5 | {% if page.collections|length > 0 %}
6 | {{ 'sylius_cms.ui.collections'|trans }}:
7 | {% hook 'collections' %}
8 | {% endif %}
9 |
10 | {% endif %}
11 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/collections/collection.html.twig:
--------------------------------------------------------------------------------
1 | {% set page = hookable_metadata.context.page %}
2 |
3 | {% for collection in page.collections %}
4 | {% hook 'collection' with { collection } %}
5 | {% endfor %}
6 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/collections/collection/name.html.twig:
--------------------------------------------------------------------------------
1 | {% set collection = hookable_metadata.context.collection %}
2 |
3 | {{ collection.name }}
4 |
--------------------------------------------------------------------------------
/templates/shop/page/show/content/not_published.html.twig:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/templates/shop/page/show/link.html.twig:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/block.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_block(
2 | code,
3 | template|default(null),
4 | context|default(null),
5 | ) }}
6 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/collection.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_collection(
2 | code,
3 | count_to_render|default(null),
4 | template|default(null),
5 | ) }}
6 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/content.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_content(contentable_resource) }}
2 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/content_elements.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_content_elements(item) }}
2 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/media.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_media(code) }}
2 |
--------------------------------------------------------------------------------
/templates/shop/shared/components/render/page_link.html.twig:
--------------------------------------------------------------------------------
1 | {{ sylius_cms_render_page_link(
2 | code,
3 | options|default([]),
4 | template|default(null),
5 | ) }}
6 |
--------------------------------------------------------------------------------
/tests/Behat/Behaviour/ChecksCodeImmutabilityInterface.php:
--------------------------------------------------------------------------------
1 | getDocument()->findField('Code')->getAttribute('disabled');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tests/Behat/Behaviour/ContainsEmptyListInterface.php:
--------------------------------------------------------------------------------
1 | getDocument()->find('css', '.empty-title')->getText(), 'No results found');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tests/Behat/Behaviour/ContainsErrorInterface.php:
--------------------------------------------------------------------------------
1 | getPage()->find('css', 'trix-toolbar')->setValue('test');
28 | }
29 |
30 | private function getPage(): DocumentElement
31 | {
32 | return $this->getSession()->getPage();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Block/CreatePageInterface.php:
--------------------------------------------------------------------------------
1 | getTableAccessor();
26 | $table = $this->getElement('table');
27 |
28 | return count($tableAccessor->getRowsWithFields($table, ['type' => $type]));
29 | }
30 |
31 | public function deleteBlock(string $code): void
32 | {
33 | $this->deleteResourceOnPage(['code' => $code]);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Block/IndexPageInterface.php:
--------------------------------------------------------------------------------
1 | getDocument()->fillField($field, $value);
26 | }
27 |
28 | public function fillCode(string $code): void
29 | {
30 | $this->getDocument()->fillField('Code', $code);
31 | }
32 |
33 | public function fillName(string $name): void
34 | {
35 | $this->getDocument()->fillField('Name', $name);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Collection/CreatePageInterface.php:
--------------------------------------------------------------------------------
1 | deleteResourceOnPage(['code' => $code]);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Collection/IndexPageInterface.php:
--------------------------------------------------------------------------------
1 | deleteResourceOnPage(['code' => $code]);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Media/IndexPageInterface.php:
--------------------------------------------------------------------------------
1 | deleteResourceOnPage(['code' => $code]);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Page/IndexPageInterface.php:
--------------------------------------------------------------------------------
1 | deleteResourceOnPage(['name' => $template->getName()]);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Admin/Template/IndexPageInterface.php:
--------------------------------------------------------------------------------
1 | getElement('image_block')->has('css', 'img');
23 | }
24 |
25 | public function hasBlockWithContent(string $content): bool
26 | {
27 | return $content === $this->getElement('content')->getText();
28 | }
29 |
30 | protected function getDefinedElements(): array
31 | {
32 | return array_merge(parent::getDefinedElements(), [
33 | 'image_block' => '.cms-image-block',
34 | 'content' => '.cms-block',
35 | ]);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/Behat/Page/Shop/HomePageInterface.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/services/contexts.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/services/elements.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | %locale%
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/services/pages.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/services/pages/admin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/services/pages/shop.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | sylius_shop_homepage
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites.yml:
--------------------------------------------------------------------------------
1 | imports:
2 | - suites/ui/managing_blocks.yml
3 | - suites/ui/managing_pages.yml
4 | - suites/ui/managing_collections.yml
5 | - suites/ui/managing_media.yml
6 | - suites/ui/managing_content_templates.yml
7 | - suites/ui/shop_blocks.yml
8 | - suites/ui/shop_media.yml
9 | - suites/ui/shop_pages.yml
10 |
11 | - suites/api/shop_pages.yml
12 | - suites/api/shop_blocks.yml
13 | - suites/api/shop_collections.yml
14 | - suites/api/shop_media.yml
15 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/api/shop_blocks.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | api_shop_blocks:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.admin_security
9 | - sylius_cms.behat.context.setup.block
10 | - sylius_cms.behat.context.setup.collection
11 | - sylius_cms.behat.context.transform.block
12 |
13 | - sylius_cms.behat.context.api.block
14 | filters:
15 | tags: "@shop_blocks&&@api"
16 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/api/shop_collections.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | api_shop_collections:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.admin_security
9 | - sylius_cms.behat.context.setup.collection
10 | - sylius_cms.behat.context.transform.collection
11 |
12 | - sylius_cms.behat.context.api.collection
13 | filters:
14 | tags: "@shop_collections&&@api"
15 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/api/shop_media.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | api_shop_media:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.admin_security
9 | - sylius.behat.context.setup.product
10 | - sylius_cms.behat.context.setup.media
11 | - sylius_cms.behat.context.setup.collection
12 | - sylius_cms.behat.context.transform.media
13 |
14 | - sylius_cms.behat.context.api.media
15 | filters:
16 | tags: "@shop_media&&@api"
17 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/api/shop_pages.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | api_shop_pages:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius_cms.behat.context.transform.page
8 |
9 | - sylius.behat.context.setup.channel
10 | - sylius.behat.context.setup.product
11 | - sylius_cms.behat.context.setup.page
12 | - sylius_cms.behat.context.setup.collection
13 |
14 | - sylius_cms.behat.context.api.page
15 | filters:
16 | tags: "@shop_pages&&@api"
17 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/managing_blocks.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_managing_blocks:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.admin_security
8 | - sylius.behat.context.setup.channel
9 | - sylius.behat.context.setup.product
10 | - sylius.behat.context.setup.taxonomy
11 | - sylius_cms.behat.context.setup.block
12 | - sylius_cms.behat.context.setup.collection
13 | - sylius_cms.behat.context.setup.content_template
14 | - sylius_cms.behat.context.setup.media
15 |
16 | - sylius_cms.behat.context.ui.admin.block
17 | - sylius_cms.behat.context.ui.admin.content_collection
18 | - sylius_cms.behat.context.ui.admin.trix_wysiwyg
19 |
20 | filters:
21 | tags: "@managing_blocks&&@ui"
22 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/managing_collections.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_managing_collections:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.admin_security
9 | - sylius_cms.behat.context.setup.collection
10 |
11 | - sylius_cms.behat.context.ui.admin.collection
12 | filters:
13 | tags: "@managing_collections&&@ui"
14 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/managing_content_templates.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_managing_content_templates:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 | - sylius.behat.context.setup.channel
7 | - sylius.behat.context.setup.admin_security
8 | - sylius_cms.behat.context.setup.content_template
9 | - sylius_cms.behat.context.ui.admin.content_template
10 | filters:
11 | tags: "@managing_content_templates&&@ui"
12 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/managing_media.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_managing_media:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.admin_security
9 | - sylius.behat.context.setup.product
10 | - sylius_cms.behat.context.setup.media
11 | - sylius_cms.behat.context.setup.collection
12 |
13 | - sylius_cms.behat.context.ui.admin.media
14 | - sylius_cms.behat.context.ui.admin.trix_wysiwyg
15 | - sylius_cms.behat.context.ui.admin.media
16 | filters:
17 | tags: "@managing_media&&@ui"
18 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/managing_pages.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_managing_pages:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.admin_security
8 | - sylius.behat.context.setup.channel
9 | - sylius.behat.context.setup.product
10 | - sylius.behat.context.setup.taxonomy
11 | - sylius_cms.behat.context.setup.collection
12 | - sylius_cms.behat.context.setup.content_template
13 | - sylius_cms.behat.context.setup.media
14 | - sylius_cms.behat.context.setup.page
15 |
16 | - sylius_cms.behat.context.ui.admin.content_collection
17 | - sylius_cms.behat.context.ui.admin.page
18 | - sylius_cms.behat.context.ui.admin.trix_wysiwyg
19 | - sylius_cms.behat.context.ui.shop.page
20 |
21 | filters:
22 | tags: "@managing_pages&&@ui"
23 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/shop_blocks.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_shop_blocks:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius_cms.behat.context.setup.block
9 |
10 | - sylius_cms.behat.context.ui.shop.homepage_blocks
11 | filters:
12 | tags: "@shop_blocks&&@ui"
13 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/shop_media.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_shop_media:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.product
9 | - sylius_cms.behat.context.setup.media
10 | - sylius_cms.behat.context.transform.media
11 |
12 | - sylius_cms.behat.context.ui.shop.homepage_blocks
13 | - sylius_cms.behat.context.ui.shop.media
14 | filters:
15 | tags: "@shop_media&&@ui"
16 |
--------------------------------------------------------------------------------
/tests/Behat/Resources/suites/ui/shop_pages.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | ui_shop_pages:
4 | contexts:
5 | - sylius.behat.context.hook.doctrine_orm
6 |
7 | - sylius.behat.context.setup.channel
8 | - sylius.behat.context.setup.product
9 | - sylius_cms.behat.context.setup.page
10 | - sylius_cms.behat.context.setup.collection
11 |
12 | - sylius_cms.behat.context.ui.shop.page
13 | filters:
14 | tags: "@shop_pages&&@ui"
15 |
--------------------------------------------------------------------------------
/tests/Behat/Service/RandomStringGenerator.php:
--------------------------------------------------------------------------------
1 | getDriver(), ChromeDriver::class);
30 |
31 | $session->wait(3000);
32 | $session->switchToIFrame($iframeNumber);
33 |
34 | $document->find('css', '#cms-ckeditor')->setValue($content);
35 |
36 | $session->switchToIFrame(null);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tests/Functional/DataFixtures/ORM/Api/CollectionTest/collection.yml:
--------------------------------------------------------------------------------
1 | Sylius\Component\Addressing\Model\Country:
2 | USA:
3 | code: 'US'
4 | Sylius\Component\Currency\Model\Currency:
5 | dollar:
6 | code: 'USD'
7 | Sylius\Component\Locale\Model\Locale:
8 | locale:
9 | createdAt: ''
10 | code: 'en_US'
11 | Sylius\Component\Core\Model\Channel:
12 | channel:
13 | code: "code"
14 | name: "name"
15 | locales:
16 | - '@locale'
17 | default_locale: '@locale'
18 | tax_calculation_strategy: 'order_items_based'
19 | base_currency: '@dollar'
20 | Sylius\CmsPlugin\Entity\Collection:
21 | collection1:
22 | code: 'collection1-code'
23 | name: 'collection1-name'
24 | type: 'page'
25 | collection2:
26 | code: 'collection2-code'
27 | name: 'collection2-name'
28 | type: 'block'
29 | collection3:
30 | code: 'collection3-code'
31 | name: 'collection3-name'
32 | type: 'media'
33 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/BlockTest/test_it_get_block_by_id.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Block",
3 | "@id": "/api/v2/shop/cms/blocks/@integer@",
4 | "@type": "Block",
5 | "id": "@integer@",
6 | "code": "block1-code",
7 | "name": "block1-name",
8 | "enabled": true,
9 | "collections": [
10 | "/api/v2/shop/cms/collections/@integer@"
11 | ],
12 | "channels": [
13 | "/api/v2/shop/channels/code"
14 | ],
15 | "contentElements": [],
16 | "products": [],
17 | "taxons": [],
18 | "productsInTaxons": []
19 | }
20 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/BlockTest/test_it_get_blocks.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Block",
3 | "@id": "/api/v2/shop/cms/blocks",
4 | "@type": "hydra:Collection",
5 | "hydra:member": [
6 | {
7 | "@id": "/api/v2/shop/cms/blocks/@integer@",
8 | "@type": "Block",
9 | "id": "@integer@",
10 | "code": "block1-code",
11 | "name": "block1-name",
12 | "enabled": true
13 | },
14 | {
15 | "@id": "/api/v2/shop/cms/blocks/@integer@",
16 | "@type": "Block",
17 | "id": "@integer@",
18 | "code": "block2-code",
19 | "name": "block2-name",
20 | "enabled": true
21 | },
22 | {
23 | "@id": "/api/v2/shop/cms/blocks/@integer@",
24 | "@type": "Block",
25 | "id": "@integer@",
26 | "code": "block3-code",
27 | "name": "block3-name",
28 | "enabled": true
29 | }
30 | ],
31 | "hydra:totalItems": 3
32 | }
33 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/CollectionTest/test_it_get_collection_by_id.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Collection",
3 | "@id": "/api/v2/shop/cms/collections/@integer@",
4 | "@type": "Collection",
5 | "id": "@integer@",
6 | "code": "collection1-code",
7 | "type": "page",
8 | "pages": [],
9 | "blocks": [],
10 | "media": []
11 | }
12 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/CollectionTest/test_it_get_collections.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Collection",
3 | "@id": "/api/v2/shop/cms/collections",
4 | "@type": "hydra:Collection",
5 | "hydra:member": [
6 | {
7 | "@id": "/api/v2/shop/cms/collections/@integer@",
8 | "@type": "Collection",
9 | "id": "@integer@",
10 | "code": "collection1-code",
11 | "type": "page"
12 | },
13 | {
14 | "@id": "/api/v2/shop/cms/collections/@integer@",
15 | "@type": "Collection",
16 | "id": "@integer@",
17 | "code": "collection2-code",
18 | "type": "block"
19 | },
20 | {
21 | "@id": "/api/v2/shop/cms/collections/@integer@",
22 | "@type": "Collection",
23 | "id": "@integer@",
24 | "code": "collection3-code",
25 | "type": "media"
26 | }
27 | ],
28 | "hydra:totalItems": 3
29 | }
30 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/MediaTest/test_it_get_media_by_id.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Media",
3 | "@id": "/api/v2/shop/cms/media/@integer@",
4 | "@type": "Media",
5 | "id": "@integer@",
6 | "type": "image",
7 | "code": "media1-code",
8 | "name": "media1-name",
9 | "path": "/path/to/media1",
10 | "mimeType": null,
11 | "width": null,
12 | "height": null,
13 | "saveWithOriginalName": false,
14 | "enabled": true,
15 | "collections": [
16 | "/api/v2/shop/cms/collections/@integer@"
17 | ],
18 | "channels": [
19 | "/api/v2/shop/channels/code"
20 | ],
21 | "translations": {
22 | "en_US": {
23 | "@type": "MediaTranslation",
24 | "@id": "/api/v2/.well-known/genid/@string@",
25 | "content": "translation_content_en_US",
26 | "alt": null,
27 | "link": "translation_link_en_US"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/PageTest/test_it_get_page_by_id.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Page",
3 | "@id": "/api/v2/shop/cms/pages/@integer@",
4 | "@type": "Page",
5 | "id": "@integer@",
6 | "code": "page1-code",
7 | "name": null,
8 | "publishAt": null,
9 | "contentElements": [],
10 | "translations": {
11 | "en_US": {
12 | "@type": "PageTranslation",
13 | "@id": "/api/v2/.well-known/genid/@string@",
14 | "slug": "translation1_slug_en_US",
15 | "title": "Amazing article1",
16 | "metaKeywords": "html,application",
17 | "metaDescription": null,
18 | "teaserTitle": "Amazing article1",
19 | "teaserContent": "This is a teaser content",
20 | "teaserImage": null
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/Functional/Responses/Expected/Api/PageTest/test_it_get_pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "@context": "/api/v2/contexts/Page",
3 | "@id": "/api/v2/shop/cms/pages",
4 | "@type": "hydra:Collection",
5 | "hydra:totalItems": 3,
6 | "hydra:member": [
7 | {
8 | "@id": "/api/v2/shop/cms/pages/@integer@",
9 | "@type": "Page",
10 | "id": "@integer@",
11 | "code": "page1-code",
12 | "name": null
13 | },
14 | {
15 | "@id": "/api/v2/shop/cms/pages/@integer@",
16 | "@type": "Page",
17 | "id": "@integer@",
18 | "code": "page2-code",
19 | "name": null
20 | },
21 | {
22 | "@id": "/api/v2/shop/cms/pages/@integer@",
23 | "@type": "Page",
24 | "id": "@integer@",
25 | "code": "page3-code",
26 | "name": null
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/tests/Integration/DataFixtures/ORM/BlockRepositoryTest/test_it_finds_block_by_code.yml:
--------------------------------------------------------------------------------
1 | Sylius\Component\Addressing\Model\Country:
2 | USA:
3 | code: 'US'
4 | Sylius\Component\Currency\Model\Currency:
5 | dollar:
6 | code: 'USD'
7 | Sylius\Component\Locale\Model\Locale:
8 | locale:
9 | createdAt: ''
10 | code: 'en_US'
11 | Sylius\Component\Core\Model\Channel:
12 | channel:
13 | code: "code"
14 | name: "name"
15 | locales:
16 | - '@locale'
17 | default_locale: '@locale'
18 | tax_calculation_strategy: 'order_items_based'
19 | base_currency: '@dollar'
20 | Sylius\CmsPlugin\Entity\Block:
21 | block1:
22 | code: 'block1-code'
23 | enabled: true
24 | channels:
25 | - '@channel'
26 | block2:
27 | code: 'block2-code'
28 | enabled: true
29 | channels:
30 | - '@channel'
31 | block3:
32 | code: 'block3-code'
33 | enabled: false
34 | channels:
35 | - '@channel'
36 |
37 |
--------------------------------------------------------------------------------
/tests/Integration/DataFixtures/ORM/CollectionRepositoryTest/test_it_finds_collection_by_code.yml:
--------------------------------------------------------------------------------
1 | Sylius\Component\Addressing\Model\Country:
2 | USA:
3 | code: 'US'
4 | Sylius\Component\Currency\Model\Currency:
5 | dollar:
6 | code: 'USD'
7 | Sylius\Component\Locale\Model\Locale:
8 | locale:
9 | createdAt: ''
10 | code: 'en_US'
11 | Sylius\Component\Core\Model\Channel:
12 | channel:
13 | code: "code"
14 | name: "name"
15 | locales:
16 | - '@locale'
17 | default_locale: '@locale'
18 | tax_calculation_strategy: 'order_items_based'
19 | base_currency: '@dollar'
20 | Sylius\CmsPlugin\Entity\Collection:
21 | collection1:
22 | code: 'collection1-code'
23 | collection2:
24 | code: 'collection2-code'
25 | collection3:
26 | code: 'collection3-code'
27 |
--------------------------------------------------------------------------------
/tests/Integration/DataFixtures/ORM/CollectionRepositoryTest/test_it_finds_collection_by_codes_and_locale.yml:
--------------------------------------------------------------------------------
1 | Sylius\Component\Addressing\Model\Country:
2 | USA:
3 | code: 'US'
4 | Sylius\Component\Currency\Model\Currency:
5 | dollar:
6 | code: 'USD'
7 | Sylius\Component\Locale\Model\Locale:
8 | locale:
9 | createdAt: ''
10 | code: 'en_US'
11 | Sylius\Component\Core\Model\Channel:
12 | channel:
13 | code: "code"
14 | name: "name"
15 | locales:
16 | - '@locale'
17 | default_locale: '@locale'
18 | tax_calculation_strategy: 'order_items_based'
19 | base_currency: '@dollar'
20 | Sylius\CmsPlugin\Entity\Collection:
21 | collection1:
22 | code: 'collection1-code'
23 | collection2:
24 | code: 'collection2-code'
25 | collection3:
26 | code: 'collection3-code'
27 |
--------------------------------------------------------------------------------
/tests/Integration/DataFixtures/ORM/CollectionRepositoryTest/test_it_finds_collection_by_name.yml:
--------------------------------------------------------------------------------
1 | Sylius\Component\Addressing\Model\Country:
2 | USA:
3 | code: 'US'
4 | Sylius\Component\Currency\Model\Currency:
5 | dollar:
6 | code: 'USD'
7 | Sylius\Component\Locale\Model\Locale:
8 | locale:
9 | createdAt: ''
10 | code: 'en_US'
11 | Sylius\Component\Core\Model\Channel:
12 | channel:
13 | code: "code"
14 | name: "name"
15 | locales:
16 | - '@locale'
17 | default_locale: '@locale'
18 | tax_calculation_strategy: 'order_items_based'
19 | base_currency: '@dollar'
20 | Sylius\CmsPlugin\Entity\Collection:
21 | collection1:
22 | code: 'collection1-code'
23 | name: 'collection1-name'
24 | type: 'page'
25 | collection2:
26 | code: 'collection2-code'
27 | name: 'collection2-name'
28 | type: 'block'
29 | collection3:
30 | code: 'collection3-code'
31 | name: 'collection3-name'
32 | type: 'media'
33 |
--------------------------------------------------------------------------------
/tests/Integration/DataFixtures/ORM/TemplateRepositoryTest/test_it_finds_template_by_name.yml:
--------------------------------------------------------------------------------
1 | Sylius\CmsPlugin\Entity\Template:
2 | template1:
3 | name: 'template1-name'
4 | type: 'page'
5 | template2:
6 | name: 'template2-name'
7 | type: 'page'
8 | template3:
9 | name: 'template3-name'
10 | type: 'page'
11 | template4:
12 | name: 'template4-name'
13 | type: 'block'
14 | template5:
15 | name: 'template5-name'
16 | type: 'block'
17 | template6:
18 | name: 'template6-name'
19 | type: 'block'
20 |
--------------------------------------------------------------------------------
/tests/TestApplication/.env:
--------------------------------------------------------------------------------
1 | DATABASE_URL=mysql://root@127.0.0.1/sylius_cms_%kernel.environment%
2 |
3 | BUNDLES_TO_ENABLE="Sylius\CmsPlugin\SyliusCmsPlugin"
4 | CONFIGS_TO_IMPORT="@SyliusCmsPlugin/tests/TestApplication/config/config.yaml"
5 | ROUTES_TO_IMPORT="@SyliusCmsPlugin/config/routes.yaml"
6 |
--------------------------------------------------------------------------------
/tests/TestApplication/config/services_test.php:
--------------------------------------------------------------------------------
1 | import('../../../vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml');
21 | $container->import('@SyliusCmsPlugin/tests/Behat/Resources/services.xml');
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/tests/TestApplication/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "swiper": "^11.2.6",
4 | "trix": "^2.0.0"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/TestApplication/templates/shop/header/navbar/menu/blog_item.html.twig:
--------------------------------------------------------------------------------
1 |
2 | Blog
3 |
4 |
--------------------------------------------------------------------------------
/tests/TestApplication/templates/shop/header/navbar/menu/faq_item.html.twig:
--------------------------------------------------------------------------------
1 |
2 | FAQ
3 |
4 |
--------------------------------------------------------------------------------
/tests/TestApplication/templates/shop/homepage/index/container.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% hook 'container' %}
3 |
4 |
--------------------------------------------------------------------------------
/tests/TestApplication/templates/shop/homepage/index/sections.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% hook 'sections' %}
4 |
5 |
6 | {% hook 'sections#left' %}
7 |
8 |
9 | {% hook 'sections#right' %}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/TestApplication/templates/shop/template/custom_page.html.twig:
--------------------------------------------------------------------------------
1 | This is a test template
2 |
--------------------------------------------------------------------------------