| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 15 | public function load(ObjectManager $manager) |
||
| 16 | { |
||
| 17 | $user = (new User()) |
||
| 18 | ->setEmail('[email protected]') |
||
| 19 | ->setRoles([User::ROLE_DEFAULT]); |
||
| 20 | |||
| 21 | $manager->persist($user); |
||
| 22 | |||
| 23 | $media = (new Media()) |
||
| 24 | ->setRelativeDir('media') |
||
| 25 | ->setMimeType('image/png') |
||
| 26 | ->setSize(2) |
||
| 27 | ->setSlug('piedweb-logo.png') |
||
| 28 | ->setMedia('piedweb-logo.png') |
||
| 29 | ->setName('Pied Web Logo'); |
||
| 30 | |||
| 31 | $manager->persist($media); |
||
| 32 | |||
| 33 | $page = (new Page()) |
||
| 34 | ->setH1('Welcome : this is your first page') |
||
| 35 | ->setSlug('homepage') |
||
| 36 | ->setLocale('en') |
||
| 37 | ->setCreatedAt(new DateTime('2 days ago')) |
||
| 38 | ->setMainContent(file_get_contents(__DIR__.'/WelcomePageMainContent.md')) |
||
| 39 | ->setMainContentType(PageMainContentType::MARKDOWN); |
||
| 40 | |||
| 41 | $manager->persist($page); |
||
| 42 | |||
| 43 | $manager->flush(); |
||
| 44 | } |
||
| 46 |