├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── build.yaml ├── .gitignore ├── LICENSE ├── LICENSE_OF_TRADEMARK_AND_LOGO ├── README.md ├── assets ├── admin │ ├── controllers.json │ ├── controllers │ │ └── PreviewController.js │ ├── entrypoint.js │ └── js │ │ └── trix │ │ └── trix-editor.js └── shop │ ├── controllers.json │ ├── entrypoint.js │ ├── js │ └── index.js │ └── scss │ ├── _line-clamp.scss │ └── main.scss ├── behat.yaml.dist ├── composer.json ├── config ├── api_platform │ ├── properties │ │ ├── Block.xml │ │ ├── Collection.xml │ │ ├── Media.xml │ │ ├── Page.xml │ │ └── Template.xml │ └── resources │ │ └── shop │ │ ├── Block.xml │ │ ├── Collection.xml │ │ ├── Media.xml │ │ ├── Page.xml │ │ └── Tempalate.xml ├── config.yaml ├── doctrine │ ├── Block.orm.xml │ ├── Collection.orm.xml │ ├── ContentConfiguration.orm.xml │ ├── Media.orm.xml │ ├── MediaTranslation.orm.xml │ ├── Page.orm.xml │ ├── PageTranslation.orm.xml │ └── Template.orm.xml ├── fixtures │ ├── 1_collection.yaml │ ├── 1_glasses.yaml │ ├── 1_media.yaml │ ├── 1_template.yaml │ ├── 2_block.yaml │ ├── 2_page.yaml │ └── images │ │ ├── blog_banner.webp │ │ ├── blog_post_1_content_image_1.webp │ │ ├── blog_post_1_content_image_2.webp │ │ ├── blog_post_1_header_banner.webp │ │ ├── blog_post_1_teaser_image.webp │ │ ├── blog_post_2_content_image_1.webp │ │ ├── blog_post_2_content_image_2.webp │ │ ├── blog_post_2_header_banner.webp │ │ ├── blog_post_2_teaser_image.webp │ │ ├── blog_post_3_content_image_1.webp │ │ ├── blog_post_3_content_image_2.webp │ │ ├── blog_post_3_header_banner.webp │ │ ├── blog_post_3_teaser_image.webp │ │ ├── glasses_banner.webp │ │ ├── glasses_content_image_1.webp │ │ ├── glasses_content_image_2.webp │ │ ├── glasses_teaser.webp │ │ ├── mid_season_sale_banner.webp │ │ ├── mid_season_sale_homepage.webp │ │ └── products │ │ ├── crystal_gaze_glasses.webp │ │ ├── future_shield_glasses.webp │ │ ├── ocean_breeze_glasses.webp │ │ ├── starry_night_glasses.webp │ │ ├── sunshine_vision_glasses.webp │ │ └── urban_vision_glasses.webp ├── grids.yaml ├── grids │ ├── admin.yaml │ ├── admin │ │ ├── block.yaml │ │ ├── collection.yaml │ │ ├── media.yaml │ │ ├── page.yaml │ │ └── template.yaml │ ├── shop.yaml │ └── shop │ │ └── page.yaml ├── routes.yaml ├── routes │ ├── admin.yaml │ ├── admin │ │ ├── block.yaml │ │ ├── collection.yaml │ │ ├── media.yaml │ │ ├── page.yaml │ │ └── template.yaml │ ├── shop.yaml │ └── shop │ │ ├── collection.yaml │ │ ├── media.yaml │ │ └── page.yaml ├── serialization │ ├── Block.xml │ ├── Collection.xml │ ├── ContentConfiguration.xml │ ├── Media.xml │ ├── MediaTranslation.xml │ ├── Page.xml │ ├── PageTranslation.xml │ └── Template.xml ├── services.xml ├── services │ ├── controller.xml │ ├── event_listener.xml │ ├── fixture.xml │ ├── form.xml │ ├── media_provider.xml │ ├── renderer.xml │ ├── resolver.xml │ ├── twig.xml │ └── twig │ │ ├── component.xml │ │ ├── extension.xml │ │ └── runtime.xml ├── twig_hooks │ ├── admin │ │ ├── block │ │ │ ├── create.yaml │ │ │ └── update.yaml │ │ ├── collection │ │ │ ├── create.yaml │ │ │ └── update.yaml │ │ ├── media │ │ │ ├── create.yaml │ │ │ └── update.yaml │ │ ├── page │ │ │ ├── create.yaml │ │ │ └── update.yaml │ │ └── template │ │ │ ├── create.yaml │ │ │ └── update.yaml │ └── shop │ │ ├── collection │ │ └── page │ │ │ └── index.yaml │ │ └── page │ │ ├── index.yaml │ │ └── show.yaml └── validation │ ├── Block.xml │ ├── Collection.xml │ ├── Media.xml │ ├── MediaTranslation.xml │ ├── Page.xml │ ├── PageTranslation.xml │ └── Template.xml ├── ecs.php ├── etc └── build │ └── .gitkeep ├── features ├── admin │ ├── adding_collection.feature │ ├── adding_content_template.feature │ ├── adding_media.feature │ ├── block │ │ ├── adding_block.feature │ │ └── managing_blocks.feature │ ├── managing_collections.feature │ ├── managing_content_templates.feature │ ├── managing_media.feature │ ├── page │ │ ├── adding_page.feature │ │ └── managing_pages.feature │ └── wysiwyg │ │ └── trix │ │ ├── manging_blocks.feature │ │ ├── manging_media.feature │ │ └── manging_pages.feature ├── api │ ├── viewing_blocks.feature │ ├── viewing_collections.feature │ ├── viewing_media.feature │ └── viewing_pages.feature └── shop │ └── displaying_page.feature ├── legacy_installation.md ├── node_modules ├── phpstan.neon.dist ├── phpunit.xml.dist ├── src ├── Context │ └── PreviewLocaleContext.php ├── Controller │ ├── Action │ │ └── Admin │ │ │ └── UploadEditorImageAction.php │ ├── BlockController.php │ ├── Helper │ │ ├── FormErrorsFlashHelper.php │ │ └── FormErrorsFlashHelperInterface.php │ ├── MediaController.php │ ├── MediaPageControllersCommonDependencyInjectionsTrait.php │ ├── PageController.php │ └── ResourceDataProcessingTrait.php ├── DependencyInjection │ ├── Compiler │ │ ├── ContentElementPass.php │ │ └── MediaProviderPass.php │ ├── Configuration.php │ └── SyliusCmsExtension.php ├── Doctrine │ └── ORM │ │ └── Extension │ │ └── EnabledAndAvailableExtension.php ├── Entity │ ├── Block.php │ ├── BlockInterface.php │ ├── BlockProductAwareInterface.php │ ├── BlockTaxonAwareInterface.php │ ├── BlockTranslationInterface.php │ ├── BlocksCollectionInterface.php │ ├── CollectibleInterface.php │ ├── Collection.php │ ├── CollectionInterface.php │ ├── ContentConfiguration.php │ ├── ContentConfigurationInterface.php │ ├── ContentElementsAwareInterface.php │ ├── ContentableInterface.php │ ├── LocaleAwareInterface.php │ ├── Media.php │ ├── MediaCollectionInterface.php │ ├── MediaInterface.php │ ├── MediaTranslation.php │ ├── MediaTranslationInterface.php │ ├── Page.php │ ├── PageInterface.php │ ├── PageTranslation.php │ ├── PageTranslationInterface.php │ ├── PagesCollectionInterface.php │ ├── ProductsAwareInterface.php │ ├── ProductsInTaxonsAwareInterface.php │ ├── StaticTemplateAwareInterface.php │ ├── TaxonAwareInterface.php │ ├── TeaserInterface.php │ ├── Template.php │ ├── TemplateInterface.php │ └── Trait │ │ ├── BlocksCollectionTrait.php │ │ ├── ChannelsAwareTrait.php │ │ ├── CollectibleTrait.php │ │ ├── ContentElementsAwareTrait.php │ │ ├── LocaleAwareTrait.php │ │ ├── MediaCollectionTrait.php │ │ ├── PagesCollectionTrait.php │ │ ├── ProductsAwareTrait.php │ │ ├── ProductsInTaxonsAwareTrait.php │ │ ├── StaticTemplateAwareTrait.php │ │ ├── TaxonAwareTrait.php │ │ └── TeaserTrait.php ├── EventListener │ └── MediaUploadListener.php ├── Fixture │ ├── Assigner │ │ ├── ChannelsAssigner.php │ │ ├── ChannelsAssignerInterface.php │ │ ├── CollectionsAssigner.php │ │ ├── CollectionsAssignerInterface.php │ │ ├── ProductsAssigner.php │ │ ├── ProductsAssignerInterface.php │ │ ├── ProductsInTaxonsAssigner.php │ │ ├── ProductsInTaxonsAssignerInterface.php │ │ ├── TaxonsAssigner.php │ │ └── TaxonsAssignerInterface.php │ ├── BlockFixture.php │ ├── CollectionFixture.php │ ├── Factory │ │ ├── BlockFixtureFactory.php │ │ ├── CollectionFixtureFactory.php │ │ ├── FixtureFactoryInterface.php │ │ ├── MediaFixtureFactory.php │ │ ├── PageFixtureFactory.php │ │ └── TemplateFixtureFactory.php │ ├── MediaFixture.php │ ├── PageFixture.php │ └── TemplateFixture.php ├── Form │ ├── DataTransformer │ │ ├── ContentElementDataTransformerChecker.php │ │ └── MultipleMediaToCodesTransformer.php │ ├── Normalizer │ │ └── TypedQueryBuilderNormalizer.php │ ├── Strategy │ │ └── Wysiwyg │ │ │ ├── AbstractWysiwygStrategy.php │ │ │ ├── TrixStrategy.php │ │ │ └── WysiwygStrategyInterface.php │ └── Type │ │ ├── BlockAutocompleteType.php │ │ ├── BlockType.php │ │ ├── CollectionAutocompleteType.php │ │ ├── CollectionType.php │ │ ├── ContentConfigurationType.php │ │ ├── ContentElementChoiceType.php │ │ ├── ContentElementType.php │ │ ├── ContentElements │ │ ├── ContentElementConfigurationType.php │ │ ├── HeadingContentElementType.php │ │ ├── MultipleMediaContentElementType.php │ │ ├── PagesCollectionContentElementType.php │ │ ├── ProductsCarouselByTaxonContentElementType.php │ │ ├── ProductsCarouselContentElementType.php │ │ ├── ProductsGridByTaxonContentElementType.php │ │ ├── ProductsGridContentElementType.php │ │ ├── SingleMediaContentElementType.php │ │ ├── SpacerContentElementType.php │ │ ├── TaxonsListContentElementType.php │ │ └── TextareaContentElementType.php │ │ ├── MediaAutocompleteType.php │ │ ├── MediaType.php │ │ ├── PageAutocompleteType.php │ │ ├── PageType.php │ │ ├── TemplateAutocompleteType.php │ │ ├── TemplateType.php │ │ ├── Translation │ │ ├── ContentConfigurationTranslationsType.php │ │ ├── MediaTranslationType.php │ │ └── PageTranslationType.php │ │ └── WysiwygType.php ├── MediaProvider │ ├── FilenameHelper.php │ ├── GenericProvider.php │ └── ProviderInterface.php ├── Menu │ ├── ContentManagementMenuBuilder.php │ ├── MenuReorder.php │ └── MenuReorderInterface.php ├── Migrations │ ├── Version20250418063555.php │ └── Version20250418065534.php ├── Provider │ ├── ResourceTemplateProvider.php │ └── ResourceTemplateProviderInterface.php ├── Renderer │ ├── Collection │ │ ├── CollectionBlocksRenderer.php │ │ ├── CollectionMediaRenderer.php │ │ ├── CollectionPagesRenderer.php │ │ └── CollectionRendererInterface.php │ ├── CollectionRendererStrategy.php │ ├── CollectionRendererStrategyInterface.php │ ├── ContentElement │ │ ├── AbstractContentElement.php │ │ ├── ContentElementRendererInterface.php │ │ ├── HeadingContentElementRenderer.php │ │ ├── MultipleMediaContentElementRenderer.php │ │ ├── PagesCollectionContentElementRenderer.php │ │ ├── ProductsCarouselByTaxonContentElementRenderer.php │ │ ├── ProductsCarouselContentElementRenderer.php │ │ ├── ProductsGridByTaxonContentElementRenderer.php │ │ ├── ProductsGridContentElementRenderer.php │ │ ├── SingleMediaContentElementRenderer.php │ │ ├── SpacerContentElementRenderer.php │ │ ├── TaxonsListContentElementRenderer.php │ │ └── TextareaContentElementRenderer.php │ ├── ContentElementRendererStrategy.php │ ├── ContentElementRendererStrategyInterface.php │ ├── PageLinkRenderer.php │ └── PageLinkRendererInterface.php ├── Repository │ ├── BlockRepository.php │ ├── BlockRepositoryInterface.php │ ├── CollectionRepository.php │ ├── CollectionRepositoryInterface.php │ ├── ContentConfigurationRepository.php │ ├── MediaRepository.php │ ├── MediaRepositoryInterface.php │ ├── PageRepository.php │ ├── PageRepositoryInterface.php │ ├── TemplateRepository.php │ ├── TemplateRepositoryInterface.php │ └── TranslationBasedAwareTrait.php ├── Resolver │ ├── BlockResourceResolver.php │ ├── BlockResourceResolverInterface.php │ ├── CollectionResourceResolver.php │ ├── CollectionResourceResolverInterface.php │ ├── MediaProviderResolver.php │ ├── MediaProviderResolverInterface.php │ ├── MediaResourceResolver.php │ ├── MediaResourceResolverInterface.php │ ├── PageResourceResolver.php │ ├── PageResourceResolverInterface.php │ ├── ResourceResolver.php │ ├── ResourceResolverInterface.php │ ├── WysiwygStrategyResolver.php │ └── WysiwygStrategyResolverInterface.php ├── Sorter │ ├── CollectionsSorter.php │ ├── CollectionsSorterInterface.php │ └── SorterById.php ├── SyliusCmsPlugin.php ├── Twig │ ├── Component │ │ ├── Block │ │ │ └── FormComponent.php │ │ ├── MediaPreviewComponent.php │ │ ├── Page │ │ │ └── FormComponent.php │ │ └── Trait │ │ │ ├── ContentElementsCollectionFormComponentTrait.php │ │ │ └── PreviewComponentTrait.php │ ├── Extension │ │ ├── RenderBlockExtension.php │ │ ├── RenderCollectionExtension.php │ │ ├── RenderContentElementsExtension.php │ │ ├── RenderContentExtension.php │ │ ├── RenderMediaExtension.php │ │ ├── RenderPageLinkExtension.php │ │ ├── ResolveMediaVideoPathExtension.php │ │ └── TemplateExistsExtension.php │ ├── Parser │ │ ├── ContentParser.php │ │ └── ContentParserInterface.php │ └── Runtime │ │ ├── RenderBlockRuntime.php │ │ ├── RenderBlockRuntimeInterface.php │ │ ├── RenderCollectionRuntime.php │ │ ├── RenderCollectionRuntimeInterface.php │ │ ├── RenderContentElementsRuntime.php │ │ ├── RenderContentElementsRuntimeInterface.php │ │ ├── RenderContentRuntime.php │ │ ├── RenderContentRuntimeInterface.php │ │ ├── RenderMediaRuntime.php │ │ ├── RenderMediaRuntimeInterface.php │ │ ├── RenderPageLinkRuntime.php │ │ ├── RenderPageLinkRuntimeInterface.php │ │ ├── ResolveMediaVideoPathRuntime.php │ │ ├── ResolveMediaVideoPathRuntimeInterface.php │ │ ├── TemplateExistsRuntime.php │ │ └── TemplateExistsRuntimeInterface.php ├── Uploader │ ├── MediaUploader.php │ └── MediaUploaderInterface.php └── Validator │ ├── Constraint │ └── FileMatchesType.php │ └── FileMatchesTypeValidator.php ├── symfony.lock ├── templates ├── admin │ ├── block │ │ ├── form.html.twig │ │ ├── form │ │ │ ├── sections.html.twig │ │ │ └── sections │ │ │ │ ├── collections.html.twig │ │ │ │ ├── content.html.twig │ │ │ │ ├── content │ │ │ │ ├── template.html.twig │ │ │ │ ├── translations.html.twig │ │ │ │ └── translations │ │ │ │ │ ├── elements.html.twig │ │ │ │ │ └── elements_template.html.twig │ │ │ │ ├── display_config.html.twig │ │ │ │ ├── display_config │ │ │ │ ├── products.html.twig │ │ │ │ ├── products_in_taxons.html.twig │ │ │ │ └── taxons.html.twig │ │ │ │ ├── general.html.twig │ │ │ │ └── general │ │ │ │ ├── channels.html.twig │ │ │ │ ├── code.html.twig │ │ │ │ ├── enabled.html.twig │ │ │ │ └── name.html.twig │ │ ├── form_theme.html.twig │ │ └── preview.html.twig │ ├── collection │ │ ├── form.html.twig │ │ └── form │ │ │ ├── sections.html.twig │ │ │ └── sections │ │ │ ├── elements.html.twig │ │ │ ├── elements │ │ │ └── collection_elements.html.twig │ │ │ ├── general.html.twig │ │ │ └── general │ │ │ ├── code.html.twig │ │ │ ├── name.html.twig │ │ │ └── type.html.twig │ ├── grid │ │ └── field │ │ │ ├── channels.html.twig │ │ │ ├── collections.html.twig │ │ │ ├── content.html.twig │ │ │ ├── image_preview.html.twig │ │ │ ├── name.html.twig │ │ │ └── page_image.html.twig │ ├── media │ │ ├── form.html.twig │ │ ├── form │ │ │ ├── sections.html.twig │ │ │ └── sections │ │ │ │ ├── collections.html.twig │ │ │ │ ├── general.html.twig │ │ │ │ ├── general │ │ │ │ ├── channels.html.twig │ │ │ │ ├── code.html.twig │ │ │ │ ├── enabled.html.twig │ │ │ │ ├── name.html.twig │ │ │ │ └── translations.html.twig │ │ │ │ ├── media.html.twig │ │ │ │ ├── media │ │ │ │ ├── file.html.twig │ │ │ │ ├── path.html.twig │ │ │ │ ├── preview.html.twig │ │ │ │ ├── save_with_original_filename.html.twig │ │ │ │ └── type.html.twig │ │ │ │ ├── translations.html.twig │ │ │ │ └── translations │ │ │ │ ├── alt.html.twig │ │ │ │ ├── content.html.twig │ │ │ │ └── link.html.twig │ │ └── preview │ │ │ ├── file.html.twig │ │ │ ├── image.html.twig │ │ │ └── video.html.twig │ ├── page │ │ ├── form.html.twig │ │ ├── form │ │ │ ├── sections.html.twig │ │ │ └── sections │ │ │ │ ├── collections.html.twig │ │ │ │ ├── content.html.twig │ │ │ │ ├── content │ │ │ │ ├── fields.html.twig │ │ │ │ ├── fields │ │ │ │ │ └── template.html.twig │ │ │ │ ├── translations.html.twig │ │ │ │ └── translations │ │ │ │ │ ├── elements.html.twig │ │ │ │ │ └── elements_template.html.twig │ │ │ │ ├── general.html.twig │ │ │ │ ├── general │ │ │ │ ├── buttons.html.twig │ │ │ │ ├── channels.html.twig │ │ │ │ ├── code.html.twig │ │ │ │ ├── enabled.html.twig │ │ │ │ ├── name.html.twig │ │ │ │ └── publish_at.html.twig │ │ │ │ ├── seo.html.twig │ │ │ │ ├── seo │ │ │ │ ├── translations.html.twig │ │ │ │ └── translations │ │ │ │ │ ├── meta_description.html.twig │ │ │ │ │ ├── meta_keywords.html.twig │ │ │ │ │ ├── meta_title.html.twig │ │ │ │ │ └── slug.html.twig │ │ │ │ ├── teaser.html.twig │ │ │ │ └── teaser │ │ │ │ ├── translations.html.twig │ │ │ │ └── translations │ │ │ │ ├── content.html.twig │ │ │ │ ├── image.html.twig │ │ │ │ └── title.html.twig │ │ ├── form_theme.html.twig │ │ ├── link.html.twig │ │ └── preview.html.twig │ ├── shared │ │ ├── component_elements │ │ │ └── form_theme.html.twig │ │ ├── editor │ │ │ └── trix.html.twig │ │ └── preview │ │ │ ├── missing_template.html.twig │ │ │ └── render.html.twig │ └── template │ │ ├── form.html.twig │ │ └── form │ │ ├── sections.html.twig │ │ └── sections │ │ ├── elements.html.twig │ │ ├── elements │ │ └── content_elements.html.twig │ │ ├── general.html.twig │ │ └── general │ │ ├── name.html.twig │ │ └── type.html.twig └── shop │ ├── block │ └── show.html.twig │ ├── collection │ ├── name.html.twig │ ├── page │ │ ├── index.html.twig │ │ └── index │ │ │ ├── content.html.twig │ │ │ └── content │ │ │ ├── body.html.twig │ │ │ ├── body │ │ │ ├── no_results.html.twig │ │ │ ├── pages.html.twig │ │ │ ├── pages │ │ │ │ ├── page.html.twig │ │ │ │ └── page │ │ │ │ │ └── header.html.twig │ │ │ └── pagination.html.twig │ │ │ └── header.html.twig │ └── show.html.twig │ ├── content_element │ ├── elements │ │ ├── heading.html.twig │ │ ├── multiple_media.html.twig │ │ ├── pages_collection.html.twig │ │ ├── products_carousel.html.twig │ │ ├── products_grid.html.twig │ │ ├── single_media.html.twig │ │ ├── spacer.html.twig │ │ ├── taxons_list.html.twig │ │ └── textarea.html.twig │ └── index.html.twig │ ├── media │ └── show │ │ ├── file.html.twig │ │ ├── image.html.twig │ │ └── video.html.twig │ ├── page │ ├── link.html.twig │ ├── metatags │ │ ├── description.html.twig │ │ └── keywords.html.twig │ ├── show.html.twig │ └── show │ │ ├── content.html.twig │ │ ├── content │ │ ├── body.html.twig │ │ ├── body │ │ │ ├── content_elements.html.twig │ │ │ └── header.html.twig │ │ ├── breadcrumbs.html.twig │ │ ├── collections.html.twig │ │ ├── collections │ │ │ ├── collection.html.twig │ │ │ └── collection │ │ │ │ └── name.html.twig │ │ └── not_published.html.twig │ │ └── link.html.twig │ └── shared │ └── components │ └── render │ ├── block.html.twig │ ├── collection.html.twig │ ├── content.html.twig │ ├── content_elements.html.twig │ ├── media.html.twig │ └── page_link.html.twig ├── tests ├── Behat │ ├── Behaviour │ │ ├── ChecksCodeImmutabilityInterface.php │ │ ├── ChecksCodeImmutabilityTrait.php │ │ ├── ContainsEmptyListInterface.php │ │ ├── ContainsEmptyListTrait.php │ │ ├── ContainsErrorInterface.php │ │ └── ContainsErrorTrait.php │ ├── Context │ │ ├── Api │ │ │ ├── BlockContext.php │ │ │ ├── CollectionContext.php │ │ │ ├── MediaContext.php │ │ │ └── PageContext.php │ │ ├── Setup │ │ │ ├── BlockContext.php │ │ │ ├── CollectionContext.php │ │ │ ├── ContentTemplateContext.php │ │ │ ├── MediaContext.php │ │ │ └── PageContext.php │ │ ├── Transform │ │ │ ├── BlockContext.php │ │ │ ├── CollectionContext.php │ │ │ ├── MediaContext.php │ │ │ └── PageContext.php │ │ └── Ui │ │ │ ├── Admin │ │ │ ├── BlockContext.php │ │ │ ├── CollectionContext.php │ │ │ ├── ContentCollectionContext.php │ │ │ ├── ContentTemplateContext.php │ │ │ ├── MediaContext.php │ │ │ ├── PageContext.php │ │ │ └── TrixWysiwygContext.php │ │ │ └── Shop │ │ │ ├── HomepageBlocksContext.php │ │ │ ├── MediaContext.php │ │ │ └── PageContext.php │ ├── Element │ │ └── Admin │ │ │ ├── ContentElementsCollectionElement.php │ │ │ └── ContentElementsCollectionElementInterface.php │ ├── Helpers │ │ └── ContentElementHelper.php │ ├── Page │ │ ├── Admin │ │ │ ├── Block │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ │ ├── Collection │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ │ ├── Media │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ │ ├── Page │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ │ └── Template │ │ │ │ ├── CreatePage.php │ │ │ │ ├── CreatePageInterface.php │ │ │ │ ├── IndexPage.php │ │ │ │ ├── IndexPageInterface.php │ │ │ │ ├── UpdatePage.php │ │ │ │ └── UpdatePageInterface.php │ │ └── Shop │ │ │ ├── HomePage.php │ │ │ ├── HomePageInterface.php │ │ │ └── Page │ │ │ ├── IndexPage.php │ │ │ ├── IndexPageInterface.php │ │ │ ├── ShowPage.php │ │ │ └── ShowPageInterface.php │ ├── Resources.php │ ├── Resources │ │ ├── images │ │ │ ├── aston_martin_db_11.jpg │ │ │ ├── homepage_main.jpeg │ │ │ ├── porsche_911_singer_1.jpg │ │ │ └── porsche_911_singer_2.jpg │ │ ├── services.xml │ │ ├── services │ │ │ ├── api.xml │ │ │ ├── contexts.xml │ │ │ ├── contexts │ │ │ │ ├── api.xml │ │ │ │ ├── setup.xml │ │ │ │ ├── transform.xml │ │ │ │ └── ui.xml │ │ │ ├── elements.xml │ │ │ ├── pages.xml │ │ │ └── pages │ │ │ │ ├── admin.xml │ │ │ │ ├── admin │ │ │ │ ├── block.xml │ │ │ │ ├── collection.xml │ │ │ │ ├── media.xml │ │ │ │ ├── page.xml │ │ │ │ └── template.xml │ │ │ │ └── shop.xml │ │ ├── suites.yml │ │ └── suites │ │ │ ├── api │ │ │ ├── shop_blocks.yml │ │ │ ├── shop_collections.yml │ │ │ ├── shop_media.yml │ │ │ └── shop_pages.yml │ │ │ └── ui │ │ │ ├── managing_blocks.yml │ │ │ ├── managing_collections.yml │ │ │ ├── managing_content_templates.yml │ │ │ ├── managing_media.yml │ │ │ ├── managing_pages.yml │ │ │ ├── shop_blocks.yml │ │ │ ├── shop_media.yml │ │ │ └── shop_pages.yml │ └── Service │ │ ├── FormHelper.php │ │ ├── RandomStringGenerator.php │ │ ├── RandomStringGeneratorInterface.php │ │ └── WysiwygHelper.php ├── Functional │ ├── Api │ │ ├── BlockTest.php │ │ ├── CollectionTest.php │ │ ├── MediaTest.php │ │ └── PageTest.php │ ├── DataFixtures │ │ └── ORM │ │ │ └── Api │ │ │ ├── BlockTest │ │ │ └── block.yml │ │ │ ├── CollectionTest │ │ │ └── collection.yml │ │ │ ├── MediaTest │ │ │ └── media.yml │ │ │ └── PageTest │ │ │ └── page.yml │ ├── FunctionalTestCase.php │ └── Responses │ │ └── Expected │ │ └── Api │ │ ├── BlockTest │ │ ├── test_it_get_block_by_id.json │ │ └── test_it_get_blocks.json │ │ ├── CollectionTest │ │ ├── test_it_get_collection_by_id.json │ │ └── test_it_get_collections.json │ │ ├── MediaTest │ │ ├── test_it_get_media.json │ │ └── test_it_get_media_by_id.json │ │ └── PageTest │ │ ├── test_it_get_page_by_id.json │ │ └── test_it_get_pages.json ├── Integration │ ├── DataFixtures │ │ └── ORM │ │ │ ├── BlockRepositoryTest │ │ │ ├── test_it_finds_block_by_code.yml │ │ │ ├── test_it_finds_block_by_collection_code.yml │ │ │ └── test_it_finds_block_by_product_code.yml │ │ │ ├── CollectionRepositoryTest │ │ │ ├── test_it_finds_collection_by_code.yml │ │ │ ├── test_it_finds_collection_by_codes_and_locale.yml │ │ │ └── test_it_finds_collection_by_name.yml │ │ │ ├── MediaRepositoryTest │ │ │ ├── test_it_finds_media_by_code.yml │ │ │ └── test_it_finds_media_by_name.yml │ │ │ ├── PageRepositoryTest │ │ │ ├── test_it_finds_page_by_code.yml │ │ │ ├── test_it_finds_page_by_collection_code.yml │ │ │ ├── test_it_finds_page_by_product.yml │ │ │ └── test_it_finds_page_by_product_and_collection_code.yml │ │ │ └── TemplateRepositoryTest │ │ │ └── test_it_finds_template_by_name.yml │ └── Repository │ │ ├── BlockRepositoryTest.php │ │ ├── CollectionRepositoryTest.php │ │ ├── MediaRepositoryTest.php │ │ ├── PageRepositoryTest.php │ │ └── TemplateRepositoryTest.php ├── TestApplication │ ├── .env │ ├── config │ │ ├── config.yaml │ │ └── services_test.php │ ├── package.json │ └── templates │ │ └── shop │ │ ├── header │ │ └── navbar │ │ │ └── menu │ │ │ ├── blog_item.html.twig │ │ │ └── faq_item.html.twig │ │ ├── homepage │ │ └── index │ │ │ ├── container.html.twig │ │ │ └── sections.html.twig │ │ └── template │ │ └── custom_page.html.twig └── Unit │ ├── Context │ └── PreviewLocaleContextTest.php │ ├── Controller │ └── Action │ │ └── Admin │ │ └── UploadEditorImageActionTest.php │ ├── Entity │ ├── BlockTest.php │ ├── MediaTest.php │ ├── MediaTranslationTest.php │ ├── PageTest.php │ └── PageTranslationTest.php │ ├── EventListener │ └── MediaUploadListenerTest.php │ ├── Fixture │ └── Assigner │ │ ├── ChannelsAssignerTest.php │ │ ├── CollectionsAssignerTest.php │ │ ├── ProductsAssignerTest.php │ │ ├── ProductsInTaxonsAssignerTest.php │ │ └── TaxonsAssignerTest.php │ ├── Form │ └── DataTransformer │ │ └── MultipleMediaToCodesTransformerTest.php │ ├── MediaProvider │ ├── FilenameHelperTest.php │ └── GenericProviderTest.php │ ├── Menu │ ├── ContentManagementMenuBuilderTest.php │ └── MenuReorderTest.php │ ├── Provider │ └── ResourceTemplateProviderTest.php │ ├── Renderer │ ├── Collection │ │ ├── CollectionBlocksRendererTest.php │ │ ├── CollectionMediaRendererTest.php │ │ └── CollectionPagesRendererTest.php │ ├── CollectionRendererStrategyTest.php │ ├── ContentElement │ │ ├── HeadingContentElementRendererTest.php │ │ ├── MultipleMediaContentElementRendererTest.php │ │ ├── PagesCollectionContentElementRendererTest.php │ │ ├── ProductsCarouselByTaxonContentElementRendererTest.php │ │ ├── ProductsCarouselContentElementRendererTest.php │ │ ├── ProductsGridByTaxonContentElementRendererTest.php │ │ ├── ProductsGridContentElementRendererTest.php │ │ ├── SingleMediaContentElementRendererTest.php │ │ ├── SpacerContentElementRendererTest.php │ │ ├── TaxonsListContentElementRendererTest.php │ │ └── TextareaContentElementRendererTest.php │ ├── ContentElementRendererStrategyTest.php │ └── PageLinkRendererTest.php │ ├── Resolver │ ├── BlockResourceResolverTest.php │ ├── MediaProviderResolverTest.php │ ├── MediaResourceResolverTest.php │ ├── PageResourceResolverTest.php │ └── ResourceResolverTest.php │ ├── Sorter │ └── CollectionsSorterTest.php │ └── Twig │ ├── Parser │ └── ContentParserTest.php │ └── Runtime │ ├── RenderBlockRuntimeTest.php │ ├── RenderContentElementsRuntimeTest.php │ ├── RenderContentRuntimeTest.php │ ├── RenderMediaRuntimeTest.php │ ├── RenderPageLinkRuntimeTest.php │ ├── ResolveMediaVideoPathRuntimeTest.php │ └── TemplateExistsExtensionTest.php └── translations ├── messages.cs.yml ├── messages.cs_CZ.yml ├── messages.de.yml ├── messages.en.yml ├── messages.es.yml ├── messages.fr.yml ├── messages.hr.yml ├── messages.lt.yml ├── messages.nl.yml ├── messages.pl.yml ├── messages.ru.yml ├── messages.sk.yml ├── messages.uk.yml ├── validators.cs.yml ├── validators.de.yml ├── validators.en.yml ├── validators.es.yml ├── validators.fr.yml ├── validators.hr.yml ├── validators.lt.yml ├── validators.nl.yml ├── validators.pl.yml ├── validators.ru.yml ├── validators.sk.yml └── validators.uk.yml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @Sylius/development-team 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | | Q | A 2 | | --------------- | ----- 3 | | Bug fix? | no/yes 4 | | New feature? | no/yes 5 | | BC breaks? | no/yes 6 | | Deprecations? | no/yes 7 | | Related tickets | fixes #X, partially #Y, mentioned in #Z 8 | | License | MIT 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /node_modules/ 3 | 4 | /etc/build/* 5 | !/etc/build/.gitignore 6 | 7 | /composer.lock 8 | 9 | /etc/build/* 10 | !/etc/build/.gitkeep 11 | 12 | .phpunit.result.cache 13 | 14 | /behat.yaml 15 | /phpstan.neon 16 | 17 | /tests/TestApplication/.env.local 18 | /tests/TestApplication/.env.*.local 19 | -------------------------------------------------------------------------------- /assets/admin/controllers.json: -------------------------------------------------------------------------------- 1 | { 2 | "controllers": [], 3 | "entrypoints": [] 4 | } 5 | -------------------------------------------------------------------------------- /assets/admin/entrypoint.js: -------------------------------------------------------------------------------- 1 | import './js/trix/trix-editor'; 2 | 3 | import {startStimulusApp} from '@symfony/stimulus-bridge'; 4 | 5 | import PreviewController from "./controllers/PreviewController"; 6 | 7 | // Registers Stimulus controllers from controllers.json and in the controllers/ directory 8 | export const app = startStimulusApp(require.context( 9 | '@symfony/stimulus-bridge/lazy-controller-loader!./controllers', 10 | true, 11 | /\.[jt]sx?$/ 12 | )); 13 | 14 | app.register('preview', PreviewController); 15 | 16 | app.debug = process.env.NODE_ENV !== 'production'; 17 | -------------------------------------------------------------------------------- /assets/shop/controllers.json: -------------------------------------------------------------------------------- 1 | { 2 | "controllers": [], 3 | "entrypoints": [] 4 | } 5 | -------------------------------------------------------------------------------- /assets/shop/entrypoint.js: -------------------------------------------------------------------------------- 1 | import './js'; 2 | import './scss/main.scss'; 3 | -------------------------------------------------------------------------------- /assets/shop/scss/_line-clamp.scss: -------------------------------------------------------------------------------- 1 | .line-clamp { 2 | display: -webkit-box; 3 | -webkit-line-clamp: var(--line-clamp-number); 4 | -webkit-box-orient: vertical; 5 | overflow: hidden; 6 | } 7 | -------------------------------------------------------------------------------- /assets/shop/scss/main.scss: -------------------------------------------------------------------------------- 1 | @import "line-clamp"; 2 | -------------------------------------------------------------------------------- /config/api_platform/properties/Template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /config/doctrine/MediaTranslation.orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /config/doctrine/Template.orm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /config/fixtures/1_template.yaml: -------------------------------------------------------------------------------- 1 | sylius_fixtures: 2 | suites: 3 | cms: 4 | listeners: 5 | logger: ~ 6 | fixtures: 7 | template: 8 | options: 9 | custom: 10 | homepage: 11 | name: "Page template" 12 | type: "page" 13 | content_elements: 14 | - type: "textarea" 15 | - type: "multiple_media" 16 | about: 17 | name: "Block template" 18 | type: "block" 19 | content_elements: 20 | - type: "heading" 21 | - type: "textarea" 22 | - type: "single_media" 23 | -------------------------------------------------------------------------------- /config/fixtures/images/blog_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_1_content_image_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_1_content_image_1.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_1_content_image_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_1_content_image_2.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_1_header_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_1_header_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_1_teaser_image.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_1_teaser_image.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_2_content_image_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_2_content_image_1.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_2_content_image_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_2_content_image_2.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_2_header_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_2_header_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_2_teaser_image.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_2_teaser_image.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_3_content_image_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_3_content_image_1.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_3_content_image_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_3_content_image_2.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_3_header_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_3_header_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/blog_post_3_teaser_image.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/blog_post_3_teaser_image.webp -------------------------------------------------------------------------------- /config/fixtures/images/glasses_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/glasses_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/glasses_content_image_1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/glasses_content_image_1.webp -------------------------------------------------------------------------------- /config/fixtures/images/glasses_content_image_2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/glasses_content_image_2.webp -------------------------------------------------------------------------------- /config/fixtures/images/glasses_teaser.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/glasses_teaser.webp -------------------------------------------------------------------------------- /config/fixtures/images/mid_season_sale_banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/mid_season_sale_banner.webp -------------------------------------------------------------------------------- /config/fixtures/images/mid_season_sale_homepage.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/mid_season_sale_homepage.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/crystal_gaze_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/crystal_gaze_glasses.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/future_shield_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/future_shield_glasses.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/ocean_breeze_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/ocean_breeze_glasses.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/starry_night_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/starry_night_glasses.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/sunshine_vision_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/sunshine_vision_glasses.webp -------------------------------------------------------------------------------- /config/fixtures/images/products/urban_vision_glasses.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/config/fixtures/images/products/urban_vision_glasses.webp -------------------------------------------------------------------------------- /config/grids.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@SyliusCmsPlugin/config/grids/admin.yaml" } 3 | - { resource: "@SyliusCmsPlugin/config/grids/shop.yaml" } 4 | -------------------------------------------------------------------------------- /config/grids/admin.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@SyliusCmsPlugin/config/grids/admin/block.yaml" } 3 | - { resource: "@SyliusCmsPlugin/config/grids/admin/page.yaml" } 4 | - { resource: "@SyliusCmsPlugin/config/grids/admin/collection.yaml" } 5 | - { resource: "@SyliusCmsPlugin/config/grids/admin/media.yaml" } 6 | - { resource: "@SyliusCmsPlugin/config/grids/admin/template.yaml" } 7 | -------------------------------------------------------------------------------- /config/grids/shop.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: "@SyliusCmsPlugin/config/grids/shop/page.yaml" } 3 | -------------------------------------------------------------------------------- /config/grids/shop/page.yaml: -------------------------------------------------------------------------------- 1 | sylius_grid: 2 | grids: 3 | sylius_cms_shop_page: 4 | driver: 5 | name: doctrine/orm 6 | options: 7 | class: "%sylius_cms.model.page.class%" 8 | repository: 9 | method: createShopListQueryBuilder 10 | arguments: 11 | collectionCode: $code 12 | channelCode: expr:service('sylius.context.channel').getChannel().getCode() 13 | sorting: 14 | createdAt: desc 15 | fields: 16 | createdAt: 17 | type: datetime 18 | sortable: ~ 19 | limits: [10] 20 | -------------------------------------------------------------------------------- /config/routes.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin: 2 | resource: "@SyliusCmsPlugin/config/routes/admin.yaml" 3 | prefix: '/%sylius_admin.path_name%' 4 | 5 | sylius_cms_shop: 6 | resource: "@SyliusCmsPlugin/config/routes/shop.yaml" 7 | prefix: /{_locale} 8 | -------------------------------------------------------------------------------- /config/routes/admin.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_block: 2 | resource: "@SyliusCmsPlugin/config/routes/admin/block.yaml" 3 | 4 | sylius_cms_admin_page: 5 | resource: "@SyliusCmsPlugin/config/routes/admin/page.yaml" 6 | 7 | sylius_cms_admin_collection: 8 | resource: "@SyliusCmsPlugin/config/routes/admin/collection.yaml" 9 | 10 | sylius_cms_admin_media: 11 | resource: "@SyliusCmsPlugin/config/routes/admin/media.yaml" 12 | 13 | sylius_cms_admin_template: 14 | resource: "@SyliusCmsPlugin/config/routes/admin/template.yaml" 15 | -------------------------------------------------------------------------------- /config/routes/admin/block.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_block: 2 | resource: | 3 | alias: sylius_cms.block 4 | section: admin 5 | templates: "@SyliusAdmin\\shared\\crud" 6 | except: ['show'] 7 | redirect: update 8 | grid: sylius_cms_admin_block 9 | form: 10 | type: Sylius\CmsPlugin\Form\Type\BlockType 11 | permission: true 12 | vars: 13 | all: 14 | hook_prefix: 'sylius_cms.admin.block' 15 | type: sylius.resource 16 | -------------------------------------------------------------------------------- /config/routes/admin/collection.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_collection: 2 | resource: | 3 | alias: sylius_cms.collection 4 | section: admin 5 | templates: "@SyliusAdmin\\shared\\crud" 6 | redirect: update 7 | grid: sylius_cms_admin_collection 8 | form: 9 | type: Sylius\CmsPlugin\Form\Type\CollectionType 10 | except: ['show'] 11 | permission: true 12 | vars: 13 | all: 14 | header: sylius_cms.ui.collections_header 15 | subheader: sylius_cms.ui.collections_subheader 16 | hook_prefix: 'sylius_cms.admin.collection' 17 | type: sylius.resource 18 | -------------------------------------------------------------------------------- /config/routes/admin/media.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_media: 2 | resource: | 3 | alias: sylius_cms.media 4 | section: admin 5 | templates: "@SyliusAdmin\\shared\\crud" 6 | redirect: update 7 | grid: sylius_cms_admin_media 8 | form: 9 | type: Sylius\CmsPlugin\Form\Type\MediaType 10 | except: ['show'] 11 | permission: true 12 | vars: 13 | all: 14 | hook_prefix: 'sylius_cms.admin.media' 15 | 16 | type: sylius.resource 17 | -------------------------------------------------------------------------------- /config/routes/admin/page.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_page: 2 | resource: | 3 | alias: sylius_cms.page 4 | section: admin 5 | templates: "@SyliusAdmin\\shared\\crud" 6 | redirect: update 7 | grid: sylius_cms_admin_page 8 | form: 9 | type: Sylius\CmsPlugin\Form\Type\PageType 10 | except: ['show'] 11 | permission: true 12 | vars: 13 | all: 14 | hook_prefix: 'sylius_cms.admin.page' 15 | type: sylius.resource 16 | -------------------------------------------------------------------------------- /config/routes/admin/template.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_admin_template: 2 | resource: | 3 | alias: sylius_cms.template 4 | section: admin 5 | templates: "@SyliusAdmin\\shared\\crud" 6 | except: ['show'] 7 | redirect: update 8 | grid: sylius_cms_admin_template 9 | form: 10 | type: Sylius\CmsPlugin\Form\Type\TemplateType 11 | permission: true 12 | vars: 13 | all: 14 | hook_prefix: 'sylius_cms.admin.template' 15 | type: sylius.resource 16 | -------------------------------------------------------------------------------- /config/routes/shop.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_shop_page: 2 | resource: "@SyliusCmsPlugin/config/routes/shop/page.yaml" 3 | 4 | sylius_cms_shop_collection: 5 | resource: "@SyliusCmsPlugin/config/routes/shop/collection.yaml" 6 | 7 | sylius_cms_shop_media: 8 | resource: "@SyliusCmsPlugin/config/routes/shop/media.yaml" 9 | -------------------------------------------------------------------------------- /config/routes/shop/collection.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_shop_collection_show: 2 | path: /collections/{code} 3 | methods: [GET] 4 | defaults: 5 | _controller: sylius_cms.controller.collection::showAction 6 | _sylius: 7 | template: $template 8 | repository: 9 | method: findOneByCode 10 | arguments: 11 | - $code 12 | -------------------------------------------------------------------------------- /config/routes/shop/media.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_shop_media_render: 2 | path: /media/{code} 3 | methods: [GET] 4 | defaults: 5 | _controller: sylius_cms.controller.media.overriden::renderMediaAction 6 | 7 | sylius_cms_shop_media_download: 8 | path: /media/download/{code} 9 | methods: [GET] 10 | defaults: 11 | _controller: sylius_cms.controller.media.overriden::downloadMediaAction 12 | disposition: !php/const Symfony\Component\HttpFoundation\ResponseHeaderBag::DISPOSITION_ATTACHMENT 13 | -------------------------------------------------------------------------------- /config/routes/shop/page.yaml: -------------------------------------------------------------------------------- 1 | sylius_cms_shop_page_show: 2 | path: /pages/{slug} 3 | methods: [GET] 4 | defaults: 5 | _controller: sylius_cms.controller.page.overriden::showAction 6 | 7 | sylius_cms_shop_collections_page_index: 8 | path: /collections/{code}/pages 9 | methods: [GET] 10 | defaults: 11 | _controller: sylius_cms.controller.page.overriden::indexAction 12 | _sylius: 13 | template: "@SyliusCmsPlugin/shop/collection/page/index.html.twig" 14 | grid: sylius_cms_shop_page 15 | -------------------------------------------------------------------------------- /config/serialization/MediaTranslation.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | sylius_cms:media:read:show 9 | 10 | 11 | sylius_cms:media:read:show 12 | 13 | 14 | sylius_cms:media:read:show 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /config/services/twig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | sylius_cms_render_block 11 | sylius_cms_render_media 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | %sylius_cms.twig.admin_functions% 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /etc/build/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sylius/CmsPlugin/e89d151d8bce67baa5db9580d7e5baedd27f935c/etc/build/.gitkeep -------------------------------------------------------------------------------- /features/admin/managing_collections.feature: -------------------------------------------------------------------------------- 1 | @managing_collections 2 | Feature: Managing collections 3 | In order to present the content in specific collections in my store 4 | As an Administrator 5 | I want to be able to edit and remove existing collections 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | Given I am logged in as an administrator 10 | 11 | @ui 12 | Scenario: Deleting collection 13 | Given there is a collection in the store 14 | When I go to the collections page 15 | And I delete this collection 16 | Then I should be notified that the collection has been deleted 17 | And I should see empty list of collections 18 | 19 | @ui 20 | Scenario: Seeing disabled code field while editing a collection 21 | Given there is a collection in the store 22 | When I want to edit this collection 23 | Then the code field should be disabled 24 | -------------------------------------------------------------------------------- /features/admin/managing_media.feature: -------------------------------------------------------------------------------- 1 | @managing_media 2 | Feature: Managing digital assets 3 | In order to present custom digital assets in my store 4 | As an Administrator 5 | I want to be able to manage specific media types 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | And I am logged in as an administrator 10 | 11 | @todo 12 | Scenario: Creating image media 13 | When I go to the create media page 14 | And I select image as media type 15 | And I specify the code as "aston_martin_db9" 16 | And I upload "aston_martin_db9.jpg" image 17 | And I create the media 18 | Then I should be notified that the media has been created 19 | And I should be on the edit media page 20 | 21 | 22 | @todo 23 | Scenario: Updating image media asset 24 | Given there is a media with "price" 25 | And I select image as media type 26 | -------------------------------------------------------------------------------- /features/admin/wysiwyg/trix/manging_blocks.feature: -------------------------------------------------------------------------------- 1 | @managing_blocks 2 | Feature: Managing dynamic content on block page 3 | As an Administrator 4 | I want to be able to use the Trix WYSIWYG editor 5 | 6 | Background: 7 | Given I am logged in as an administrator 8 | And the store operates on a single channel in "United States" 9 | 10 | @ui @javascript 11 | Scenario: Adding block 12 | When I go to the create block page 13 | And I add a textarea content element with "Welcome to our store" content 14 | Then I should see the Trix WYSIWYG editor initialized 15 | -------------------------------------------------------------------------------- /features/admin/wysiwyg/trix/manging_media.feature: -------------------------------------------------------------------------------- 1 | @managing_media 2 | Feature: Managing dynamic content on media page 3 | As an Administrator 4 | I want to be able to use the Trix WYSIWYG editor 5 | 6 | Background: 7 | Given I am logged in as an administrator 8 | And the store operates on a single channel in "United States" 9 | 10 | @ui @javascript 11 | Scenario: Adding media 12 | When I go to the create media page 13 | Then I should see the Trix WYSIWYG editor initialized 14 | -------------------------------------------------------------------------------- /features/admin/wysiwyg/trix/manging_pages.feature: -------------------------------------------------------------------------------- 1 | @managing_pages 2 | Feature: Managing dynamic content on block page 3 | As an Administrator 4 | I want to be able to use the Trix WYSIWYG editor 5 | 6 | Background: 7 | Given I am logged in as an administrator 8 | And the store operates on a single channel in "United States" 9 | 10 | @ui @javascript 11 | Scenario: Adding page 12 | When I go to the create page page 13 | Then I should see the Trix WYSIWYG editor initialized 14 | 15 | @ui @javascript 16 | Scenario: Updating page 17 | Given there is an existing page with "test_page" code 18 | When I go to the update "test_page" page page 19 | Then I should see the Trix WYSIWYG editor initialized 20 | 21 | -------------------------------------------------------------------------------- /features/api/viewing_blocks.feature: -------------------------------------------------------------------------------- 1 | @shop_blocks 2 | Feature: Getting data from cms blocks 3 | In order to present dynamic content in my store 4 | As an API user 5 | I want to be able to display blocks 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | And there is a block in the store 10 | And there is a block "Block 1" 11 | 12 | @api 13 | Scenario: Browsing blocks 14 | Given I want to browse blocks 15 | Then I should see 2 blocks in the list 16 | And I should see block with code "block-1" 17 | 18 | @api 19 | Scenario: Displaying block 20 | Given I view block with code "block-1" 21 | Then I should see block name 22 | 23 | -------------------------------------------------------------------------------- /features/api/viewing_collections.feature: -------------------------------------------------------------------------------- 1 | @shop_collections 2 | Feature: Getting data from cms collections 3 | In order to present dynamic content in my store 4 | As an API user 5 | I want to be able to display collections 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | And there is a collection in the store 10 | And there is an existing collection with "collection-1" code 11 | 12 | @api 13 | Scenario: Browsing collections 14 | Given I want to browse collections 15 | Then I should see 2 collections in the list 16 | And I should see collection with code "collection-1" 17 | 18 | @api 19 | Scenario: Displaying collection 20 | Given I view collection with code "collection-1" 21 | Then I should see collection name 22 | -------------------------------------------------------------------------------- /features/api/viewing_media.feature: -------------------------------------------------------------------------------- 1 | @shop_media 2 | Feature: Getting data from cms media 3 | In order to present dynamic content in my store 4 | As an API user 5 | I want to be able to display media files 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | And there is an existing media with "media-1" code 10 | And there is an existing "image" media with "image-1" code 11 | 12 | @api 13 | Scenario: Browsing media 14 | Given I want to browse media 15 | Then I should see 2 media in the list 16 | And I should see media with code "media-1" 17 | 18 | @api 19 | Scenario: Displaying media 20 | Given I view media with code "image-1" 21 | Then I should see media name 22 | -------------------------------------------------------------------------------- /features/api/viewing_pages.feature: -------------------------------------------------------------------------------- 1 | @shop_pages 2 | Feature: Getting data from cms pages 3 | In order to present dynamic content in my store 4 | As an API user 5 | I want to be able to display custom pages 6 | 7 | Background: 8 | Given the store operates on a single channel in "United States" 9 | And there are 10 pages in the store 10 | And the store has "iPhone 8" and "iPhone X" products 11 | And there is a page in the store 12 | And there are existing collections named "Blog" and "General" 13 | And this page has these collections associated with it 14 | And this page has "About us" name 15 | And this page has "about" code 16 | And this page also has "about-us" slug 17 | 18 | @api 19 | Scenario: Browsing defined pages 20 | Given I want to browse pages 21 | Then I should see 11 pages in the list 22 | And I should see the "About us" page 23 | 24 | @api 25 | Scenario: Viewing a detailed page 26 | When I view page with code "about" 27 | Then I should see the page name "About us" 28 | -------------------------------------------------------------------------------- /node_modules: -------------------------------------------------------------------------------- 1 | vendor/sylius/test-application/node_modules -------------------------------------------------------------------------------- /phpstan.neon.dist: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 8 3 | reportUnmatchedIgnoredErrors: false 4 | paths: 5 | - src 6 | -------------------------------------------------------------------------------- /src/Controller/Helper/FormErrorsFlashHelperInterface.php: -------------------------------------------------------------------------------- 1 | */ 23 | public function getBlocks(): ?Collection; 24 | 25 | public function hasBlock(BlockInterface $block): bool; 26 | 27 | public function addBlock(BlockInterface $block): void; 28 | 29 | public function removeBlock(BlockInterface $block): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/CollectibleInterface.php: -------------------------------------------------------------------------------- 1 | */ 23 | public function getCollections(): Collection; 24 | 25 | public function hasCollection(CollectionInterface $collection): bool; 26 | 27 | public function addCollection(CollectionInterface $collection): void; 28 | 29 | public function removeCollection(CollectionInterface $collection): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/CollectionInterface.php: -------------------------------------------------------------------------------- 1 | */ 23 | public function getContentElements(): Collection; 24 | 25 | public function hasContentElement(ContentConfigurationInterface $contentElement): bool; 26 | 27 | public function addContentElement(ContentConfigurationInterface $contentElement): void; 28 | 29 | public function removeContentElement(ContentConfigurationInterface $contentElement): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/ContentableInterface.php: -------------------------------------------------------------------------------- 1 | */ 24 | public function getLocales(): Collection; 25 | 26 | public function hasLocale(LocaleInterface $locale): bool; 27 | 28 | public function addLocale(LocaleInterface $locale): void; 29 | 30 | public function removeLocale(LocaleInterface $locale): void; 31 | } 32 | -------------------------------------------------------------------------------- /src/Entity/MediaCollectionInterface.php: -------------------------------------------------------------------------------- 1 | */ 23 | public function getMedia(): ?Collection; 24 | 25 | public function hasMedium(MediaInterface $media): bool; 26 | 27 | public function addMedium(MediaInterface $media): void; 28 | 29 | public function removeMedium(MediaInterface $media): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/MediaTranslationInterface.php: -------------------------------------------------------------------------------- 1 | */ 23 | public function getPages(): ?Collection; 24 | 25 | public function hasPage(PageInterface $page): bool; 26 | 27 | public function addPage(PageInterface $page): void; 28 | 29 | public function removePage(PageInterface $page): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Entity/ProductsAwareInterface.php: -------------------------------------------------------------------------------- 1 | */ 24 | public function getProducts(): Collection; 25 | 26 | public function hasProduct(ProductInterface $product): bool; 27 | 28 | public function addProduct(ProductInterface $product): void; 29 | 30 | public function removeProduct(ProductInterface $product): void; 31 | } 32 | -------------------------------------------------------------------------------- /src/Entity/ProductsInTaxonsAwareInterface.php: -------------------------------------------------------------------------------- 1 | */ 24 | public function getProductsInTaxons(): Collection; 25 | 26 | public function hasProductsInTaxon(TaxonInterface $taxon): bool; 27 | 28 | public function addProductsInTaxon(TaxonInterface $taxon): void; 29 | 30 | public function removeProductsInTaxon(TaxonInterface $taxon): void; 31 | } 32 | -------------------------------------------------------------------------------- /src/Entity/StaticTemplateAwareInterface.php: -------------------------------------------------------------------------------- 1 | */ 24 | public function getTaxons(): Collection; 25 | 26 | public function hasTaxon(TaxonInterface $taxon): bool; 27 | 28 | public function addTaxon(TaxonInterface $taxon): void; 29 | 30 | public function removeTaxon(TaxonInterface $taxon): void; 31 | } 32 | -------------------------------------------------------------------------------- /src/Entity/TeaserInterface.php: -------------------------------------------------------------------------------- 1 | */ 29 | public function getContentElements(): array; 30 | 31 | /** @param array $contentElements */ 32 | public function setContentElements(array $contentElements): void; 33 | } 34 | -------------------------------------------------------------------------------- /src/Entity/Trait/StaticTemplateAwareTrait.php: -------------------------------------------------------------------------------- 1 | template; 26 | } 27 | 28 | public function setTemplate(?string $template): void 29 | { 30 | $this->template = $template; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/ChannelsAssignerInterface.php: -------------------------------------------------------------------------------- 1 | $channelsCodes */ 21 | public function assign(ChannelsAwareInterface $channelsAware, array $channelsCodes): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/CollectionsAssigner.php: -------------------------------------------------------------------------------- 1 | collectionRepository->findBy(['code' => $collectionsCodes]); 28 | 29 | foreach ($collections as $collection) { 30 | $collectionsAware->addCollection($collection); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/CollectionsAssignerInterface.php: -------------------------------------------------------------------------------- 1 | $collectionsCodes */ 21 | public function assign(CollectibleInterface $collectionsAware, array $collectionsCodes): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/ProductsAssignerInterface.php: -------------------------------------------------------------------------------- 1 | $productsCodes */ 21 | public function assign(ProductsAwareInterface $productsAware, array $productsCodes): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/ProductsInTaxonsAssignerInterface.php: -------------------------------------------------------------------------------- 1 | $taxonCodes */ 21 | public function assign(ProductsInTaxonsAwareInterface $productsInTaxonsAware, array $taxonCodes): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Fixture/Assigner/TaxonsAssignerInterface.php: -------------------------------------------------------------------------------- 1 | $taxonCodes */ 21 | public function assign(TaxonAwareInterface $taxonAware, array $taxonCodes): void; 22 | } 23 | -------------------------------------------------------------------------------- /src/Fixture/Factory/FixtureFactoryInterface.php: -------------------------------------------------------------------------------- 1 | > $data */ 19 | public function load(array $data): void; 20 | } 21 | -------------------------------------------------------------------------------- /src/Form/Strategy/Wysiwyg/TrixStrategy.php: -------------------------------------------------------------------------------- 1 | vars['block_prefix'] = 'sylius_cms_plugin_trix_strategy'; 24 | } 25 | 26 | public function getBlockPrefix(): string 27 | { 28 | return 'sylius_cms_plugin_trix_strategy'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Form/Strategy/Wysiwyg/WysiwygStrategyInterface.php: -------------------------------------------------------------------------------- 1 | $options */ 25 | public function buildView(FormView $view, FormInterface $form, array $options): void; 26 | 27 | public function getParent(): string; 28 | 29 | public function getBlockPrefix(): string; 30 | } 31 | -------------------------------------------------------------------------------- /src/Form/Type/ContentElementType.php: -------------------------------------------------------------------------------- 1 | add('type', ContentElementChoiceType::class); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/MediaProvider/FilenameHelper.php: -------------------------------------------------------------------------------- 1 | $options */ 23 | public function render( 24 | MediaInterface $media, 25 | ?string $template = null, 26 | array $options = [], 27 | ): string; 28 | 29 | public function upload(MediaInterface $media): void; 30 | } 31 | -------------------------------------------------------------------------------- /src/Menu/MenuReorderInterface.php: -------------------------------------------------------------------------------- 1 | */ 19 | public function getPageTemplates(): array; 20 | 21 | /** @return array */ 22 | public function getBlockTemplates(): array; 23 | } 24 | -------------------------------------------------------------------------------- /src/Renderer/Collection/CollectionRendererInterface.php: -------------------------------------------------------------------------------- 1 | template = $template; 27 | } 28 | 29 | public function setTwigEnvironment(Environment $twig): void 30 | { 31 | $this->twig = $twig; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Renderer/ContentElement/ContentElementRendererInterface.php: -------------------------------------------------------------------------------- 1 | */ 21 | interface BlockRepositoryInterface extends RepositoryInterface 22 | { 23 | public function findEnabledByCode(string $code, string $channelCode): ?BlockInterface; 24 | 25 | /** @return array */ 26 | public function findByCollectionCode( 27 | string $collectionCode, 28 | string $channelCode, 29 | ): array; 30 | 31 | /** @return array */ 32 | public function findByNamePart(string $phrase): array; 33 | } 34 | -------------------------------------------------------------------------------- /src/Repository/ContentConfigurationRepository.php: -------------------------------------------------------------------------------- 1 | 24 | */ 25 | interface TemplateRepositoryInterface extends RepositoryInterface 26 | { 27 | /** @return array */ 28 | public function findTemplatesByNamePart(string $phrase, string $type): array; 29 | } 30 | -------------------------------------------------------------------------------- /src/Repository/TranslationBasedAwareTrait.php: -------------------------------------------------------------------------------- 1 | createQueryBuilder('o') 23 | ->addSelect('translation') 24 | ->leftJoin('o.translations', 'translation') 25 | ; 26 | 27 | if (null !== $locale) { 28 | $queryBuilder 29 | ->andWhere('translation.locale = :locale') 30 | ->setParameter('locale', $locale) 31 | ; 32 | } 33 | 34 | return $queryBuilder; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Resolver/BlockResourceResolverInterface.php: -------------------------------------------------------------------------------- 1 | $strategies */ 21 | public function __construct( 22 | private iterable $strategies, 23 | private string $default, 24 | ) { 25 | } 26 | 27 | public function getStrategy(string $wysiwygType): WysiwygStrategyInterface 28 | { 29 | $strategies = is_array($this->strategies) ? $this->strategies : iterator_to_array($this->strategies); 30 | 31 | return $strategies[$wysiwygType] ?? $strategies[$this->default]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Resolver/WysiwygStrategyResolverInterface.php: -------------------------------------------------------------------------------- 1 | > $pages 20 | * 21 | * @return array> 22 | */ 23 | public function sortByCollections(array $pages): array; 24 | } 25 | -------------------------------------------------------------------------------- /src/Sorter/SorterById.php: -------------------------------------------------------------------------------- 1 | $elements 22 | * 23 | * @return array 24 | */ 25 | public static function sort(array $elements, string $direction = 'asc'): array 26 | { 27 | usort($elements, static function ($element1, $element2) use ($direction) { 28 | if ('asc' === $direction) { 29 | return $element1->getId() <=> $element2->getId(); 30 | } 31 | 32 | return $element2->getId() <=> $element1->getId(); 33 | }); 34 | 35 | return $elements; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderBlockExtension.php: -------------------------------------------------------------------------------- 1 | blockRuntime, 'renderBlock'], ['is_safe' => ['html']]), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderCollectionExtension.php: -------------------------------------------------------------------------------- 1 | collectionRuntime, 'renderCollection'], 32 | ['is_safe' => ['html']], 33 | ), 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderContentElementsExtension.php: -------------------------------------------------------------------------------- 1 | ['html']], 29 | ), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderContentExtension.php: -------------------------------------------------------------------------------- 1 | ['html']]), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderMediaExtension.php: -------------------------------------------------------------------------------- 1 | mediaRuntime, 'renderMedia'], ['is_safe' => ['html']]), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Twig/Extension/RenderPageLinkExtension.php: -------------------------------------------------------------------------------- 1 | true, 27 | 'is_safe' => ['html'], 28 | ]), 29 | new TwigFunction('sylius_cms_get_page_url', [RenderPageLinkRuntime::class, 'getLinkForCode']), 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Twig/Extension/ResolveMediaVideoPathExtension.php: -------------------------------------------------------------------------------- 1 | resolveMediaVideoPathRuntime, 'resolve']), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Twig/Extension/TemplateExistsExtension.php: -------------------------------------------------------------------------------- 1 | templateExistsRuntime, 'exists']), 31 | ]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Twig/Parser/ContentParserInterface.php: -------------------------------------------------------------------------------- 1 | contentElementRendererStrategy->render($item); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Twig/Runtime/RenderContentElementsRuntimeInterface.php: -------------------------------------------------------------------------------- 1 | getContent(), \ENT_QUOTES); 28 | 29 | return $this->contentParser->parse($content); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Twig/Runtime/RenderContentRuntimeInterface.php: -------------------------------------------------------------------------------- 1 | $options */ 22 | public function renderLinkForCode( 23 | Environment $environment, 24 | string $code, 25 | array $options = [], 26 | ?string $template = null, 27 | ): string; 28 | 29 | /** @param array $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 |
3 |
{{ 'sylius.ui.content'|trans }}
4 |
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 |
3 |
{{ 'sylius_cms.ui.manage_block_display'|trans }}
4 |
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 |
8 |
9 | {{ 'sylius.ui.translations'|trans }} 10 |
11 |
12 | {{ translations.with_hook(form.translations, prefixes, null, { accordion_flush: true }) }} 13 |
14 | -------------------------------------------------------------------------------- /templates/admin/media/form/sections/media.html.twig: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | {{ 'sylius_cms.ui.media'|trans }} 5 |
6 |
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 |
8 |
9 | {{ 'sylius.ui.translations'|trans }} 10 |
11 |
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 |
4 | 5 | 6 | 7 |
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 |
3 |
4 | {{ 'sylius.ui.content'|trans }} 5 |
6 |
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 |
3 |
4 | {{ 'sylius_cms.ui.seo'|trans }} 5 |
6 |
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 |
3 |
4 | {{ 'sylius_cms.ui.teaser.header'|trans }} 5 | {{ 'sylius_cms.ui.teaser.help'|trans }} 6 |
7 |
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 | 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 |

2 | {{ collection.name }} 3 |

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 }} 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 | 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 |
2 |
3 | {% for taxon in taxons %} 4 | 5 | {{ taxon.name }} 6 | 7 | {% endfor %} 8 |
9 |
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 |
2 | {% if null != media.name %} 3 |

{{ media.name|raw }}

4 | {% endif %} 5 | 6 |

{{ sylius_cms_render_content(media) }}

7 | 8 | 9 | {{ ux_icon('tabler:download', { class: 'icon' }) }} 10 | {{ 'sylius_cms.ui.download'|trans }} 11 | 12 |
13 | -------------------------------------------------------------------------------- /templates/shop/media/show/image.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {% if media.link %} 3 | 4 | {% endif %} 5 | {% set original_path = media.path|imagine_filter('sylius_original') %} 6 | {{ media.alt }} 10 | {% if media.link %} 11 | 12 | {% endif %} 13 | 14 | {% if media.content %} 15 | {{ sylius_cms_render_content(media) }} 16 | {% endif %} 17 |
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 |

2 | {{ 'sylius_cms.ui.page_will_be_publish_at'|trans }} : {{ hookable_metadata.context.page.publishAt|date('Y/m/d H:i') }} 3 |

4 | -------------------------------------------------------------------------------- /templates/shop/page/show/link.html.twig: -------------------------------------------------------------------------------- 1 |
2 | {{ name }} 3 |
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 | --------------------------------------------------------------------------------