mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 22:37:28 +01:00
28 lines
678 B
PHP
28 lines
678 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\DataFixtures;
|
||
|
|
||
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||
|
use Doctrine\Common\Persistence\ObjectManager;
|
||
|
use App\Entity\Source\Primitive\Text\TextSource;
|
||
|
use App\Entity\Source\Primitive\Text\TextSourceInterface;
|
||
|
use App\DBAL\Types\SystemSlugType;
|
||
|
|
||
|
class SourceFixtures extends Fixture
|
||
|
{
|
||
|
public function load(ObjectManager $manager)
|
||
|
{
|
||
|
$manager->persist($this->getImpressum());
|
||
|
$manager->flush();
|
||
|
}
|
||
|
|
||
|
private function getImpressum(): TextSourceInterface
|
||
|
{
|
||
|
$source = new TextSource();
|
||
|
$source->setText('Example Impressum');
|
||
|
$source->setSlug(SystemSlugType::IMPRINT);
|
||
|
|
||
|
return $source;
|
||
|
}
|
||
|
}
|