for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file was created by the developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* another great project.
* You can find more information about us on https://bitbag.shop and write us
* an email on [email protected].
*/
declare(strict_types=1);
namespace BitBag\CmsPlugin\Fixture;
use BitBag\CmsPlugin\Fixture\Factory\FixtureFactoryInterface;
use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture;
use Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
* @author Patryk Drapik <[email protected]>
final class SectionFixture extends AbstractFixture implements FixtureInterface
{
* @var FixtureFactoryInterface
private $sectionFixtureFactory;
* @param FixtureFactoryInterface $sectionFixtureFactory
public function __construct(FixtureFactoryInterface $sectionFixtureFactory)
$this->sectionFixtureFactory = $sectionFixtureFactory;
}
* {@inheritDoc}
public function load(array $options): void
$this->sectionFixtureFactory->load($options['custom']);
public function getName(): string
return 'section';
protected function configureOptionsNode(ArrayNodeDefinition $optionsNode): void
$optionsNode
->children()
->arrayNode('custom')
->prototype('array')
->booleanNode('remove_existing')->defaultTrue()->end()
->arrayNode('translations')
->scalarNode('name')->defaultNull()->end()
->end()
;