@@ 8-31 (lines=24) @@ | ||
5 | use Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture; |
|
6 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
7 | ||
8 | final class CustomBlockFixture extends AbstractResourceFixture |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | */ |
|
13 | public function getName(): string |
|
14 | { |
|
15 | return 'lakion_cms_custom_block'; |
|
16 | } |
|
17 | ||
18 | /** |
|
19 | * {@inheritdoc} |
|
20 | */ |
|
21 | protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void |
|
22 | { |
|
23 | $resourceNode |
|
24 | ->children() |
|
25 | ->scalarNode('name')->end() |
|
26 | ->scalarNode('title')->end() |
|
27 | ->scalarNode('body')->end() |
|
28 | ->scalarNode('link')->end() |
|
29 | ; |
|
30 | } |
|
31 | } |
|
32 |
@@ 8-32 (lines=25) @@ | ||
5 | use Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture; |
|
6 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
7 | ||
8 | final class ProductBlockFixture extends AbstractResourceFixture |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | */ |
|
13 | public function getName(): string |
|
14 | { |
|
15 | return 'lakion_cms_product_block'; |
|
16 | } |
|
17 | ||
18 | /** |
|
19 | * {@inheritdoc} |
|
20 | */ |
|
21 | protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void |
|
22 | { |
|
23 | $resourceNode |
|
24 | ->children() |
|
25 | ->scalarNode('name')->end() |
|
26 | ->scalarNode('title')->end() |
|
27 | ->scalarNode('body')->end() |
|
28 | ->scalarNode('link')->end() |
|
29 | ->scalarNode('product')->end() |
|
30 | ; |
|
31 | } |
|
32 | } |
|
33 |
@@ 8-32 (lines=25) @@ | ||
5 | use Sylius\Bundle\CoreBundle\Fixture\AbstractResourceFixture; |
|
6 | use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; |
|
7 | ||
8 | final class TaxonBlockFixture extends AbstractResourceFixture |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | */ |
|
13 | public function getName(): string |
|
14 | { |
|
15 | return 'lakion_cms_taxon_block'; |
|
16 | } |
|
17 | ||
18 | /** |
|
19 | * {@inheritdoc} |
|
20 | */ |
|
21 | protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void |
|
22 | { |
|
23 | $resourceNode |
|
24 | ->children() |
|
25 | ->scalarNode('name')->end() |
|
26 | ->scalarNode('title')->end() |
|
27 | ->scalarNode('body')->end() |
|
28 | ->scalarNode('link')->end() |
|
29 | ->scalarNode('taxon')->end() |
|
30 | ; |
|
31 | } |
|
32 | } |
|
33 |