Skip to content

Commit

Permalink
OP-545: API
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Sep 24, 2024
1 parent e4399d5 commit b8e2cae
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
28 changes: 28 additions & 0 deletions src/Resources/config/serialization/ContentConfiguration.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" ?>
<serializer xmlns="http://symfony.com/schema/dic/serializer-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping https://symfony.com/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd"
>
<class name="Sylius\CmsPlugin\Entity\ContentConfiguration">
<attribute name="id">
<group>sylius_cms:page:read:index</group>
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="type">
<group>sylius_cms:page:read:index</group>
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="configuration">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="locale">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="block">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="page">
<group>sylius_cms:page:read:show</group>
</attribute>
</class>
</serializer>
9 changes: 9 additions & 0 deletions src/Resources/config/serialization/PageTranslation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@
<attribute name="title">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="teaserTitle">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="teaserContent">
<group>sylius_cms:page:read:show</group>
</attribute>
<attribute name="teaserImage">
<group>sylius_cms:page:read:show</group>
</attribute>
</class>
</serializer>
6 changes: 6 additions & 0 deletions tests/Functional/DataFixtures/ORM/Api/PageTest/page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,22 @@ Sylius\CmsPlugin\Entity\PageTranslation:
slug: 'translation1_slug_en_US'
metaKeywords: 'html,application'
title: 'Amazing article1'
teaserTitle: "Amazing article1"
teaserContent: "This is a teaser content"
page2_translation:
locale: 'en_US'
slug: 'translation2_slug_en_US'
metaKeywords: 'html,application'
title: 'Amazing article2'
teaserTitle: "Amazing article2"
teaserContent: "This is a teaser content"
page3_translation:
locale: 'en_US'
slug: 'translation3_slug_en_US'
metaKeywords: 'html,application'
title: 'Amazing article3'
teaserTitle: "Amazing article3"
teaserContent: "This is a teaser content"
Sylius\CmsPlugin\Entity\Page:
page1:
code: 'page1-code'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"slug": "translation1_slug_en_US",
"metaKeywords": "html,application",
"metaDescription": null,
"title": "Amazing article1"
"title": "Amazing article1",
"teaserTitle": "Amazing article1",
"teaserContent": "This is a teaser content",
"teaserImage": null
}
}
}

0 comments on commit b8e2cae

Please sign in to comment.