]> Raphaël G. Git Repositories - treebundle/blob - Fixture/TreeFixture.php
8ea1b4b0677babca991fed2602b1669e1bdbc24e
[treebundle] / Fixture / TreeFixture.php
1 <?php declare(strict_types=1);
2
3 /*
4 * This file is part of the Rapsys TreeBundle package.
5 *
6 * (c) Raphaël Gertz <symfony@rapsys.eu>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Rapsys\TreeBundle\Fixture;
13
14 use Doctrine\Bundle\FixturesBundle\Fixture;
15 use Doctrine\Persistence\ObjectManager;
16
17 use Rapsys\TreeBundle\RapsysTreeBundle;
18
19 use Symfony\Component\DependencyInjection\ContainerInterface;
20
21 /**
22 * {@inheritdoc}
23 */
24 class TreeFixture extends Fixture {
25 /**
26 * Config array
27 */
28 protected array $config;
29
30 /**
31 * Air fixtures constructor
32 */
33 public function __construct(protected ContainerInterface $container) {
34 //Retrieve config
35 $this->config = $container->getParameter(RapsysTreeBundle::getAlias());
36 }
37
38 /**
39 * {@inheritDoc}
40 */
41 public function load(ObjectManager $manager) {
42 //Flush to get the ids
43 $manager->flush();
44 }
45 }