Skip to content

Commit

Permalink
OP-344: Pages collection and spacer content elements
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Aug 12, 2024
1 parent c31850e commit 4ae4c02
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Type/ContentElements/SpacerContentElementType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add(self::TYPE, NumberType::class, [
'label' => 'bitbag_sylius_cms_plugin.ui.content_elements.type.' . self::TYPE . '_height',
'attr' => [
"min" => 0,
'min' => 0,
],
'html5' => true,
])
Expand Down
13 changes: 13 additions & 0 deletions src/Resources/config/services/form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<parameter key="bitbag_sylius_cms_plugin.content_elements.type.products_grid" type="constant">BitBag\SyliusCmsPlugin\Form\Type\ContentElements\ProductsGridContentElementType::TYPE</parameter>
<parameter key="bitbag_sylius_cms_plugin.content_elements.type.products_grid_by_taxon" type="constant">BitBag\SyliusCmsPlugin\Form\Type\ContentElements\ProductsGridByTaxonContentElementType::TYPE</parameter>
<parameter key="bitbag_sylius_cms_plugin.content_elements.type.taxons_list" type="constant">BitBag\SyliusCmsPlugin\Form\Type\ContentElements\TaxonsListContentElementType::TYPE</parameter>
<parameter key="bitbag_sylius_cms_plugin.content_elements.type.pages_collection" type="constant">BitBag\SyliusCmsPlugin\Form\Type\ContentElements\PagesCollectionContentElementType::TYPE</parameter>
<parameter key="bitbag_sylius_cms_plugin.content_elements.type.spacer" type="constant">BitBag\SyliusCmsPlugin\Form\Type\ContentElements\SpacerContentElementType::TYPE</parameter>
</parameters>

<services>
Expand Down Expand Up @@ -136,6 +138,17 @@
<tag name="form.type" />
</service>

<service id="bitbag_sylius_cms_plugin.form.type.content_element.pages_collection" class="BitBag\SyliusCmsPlugin\Form\Type\ContentElements\PagesCollectionContentElementType">
<argument type="service" id="bitbag_sylius_cms_plugin.repository.collection" />
<tag name="bitbag_sylius_cms_plugin.content_elements.type" key="%bitbag_sylius_cms_plugin.content_elements.type.pages_collection%" />
<tag name="form.type" />
</service>

<service id="bitbag_sylius_cms_plugin.form.type.content_element.spacer" class="BitBag\SyliusCmsPlugin\Form\Type\ContentElements\SpacerContentElementType">
<tag name="bitbag_sylius_cms_plugin.content_elements.type" key="%bitbag_sylius_cms_plugin.content_elements.type.spacer%" />
<tag name="form.type" />
</service>

<service id="bitbag_sylius_cms_plugin.form.type.data_transformer.multiple_media_to_codes" class="BitBag\SyliusCmsPlugin\Form\DataTransformer\MultipleMediaToCodesTransformer">
<argument type="service" id="bitbag_sylius_cms_plugin.repository.media" />
</service>
Expand Down

0 comments on commit 4ae4c02

Please sign in to comment.