Conditions | 1 |
Paths | 1 |
Total Lines | 35 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function load(ObjectManager $manager) |
||
19 | { |
||
20 | $youtubeVideo = new VideoType(); |
||
21 | |||
22 | $youtubeVideo->setSite("Youtube"); |
||
23 | $youtubeVideo->setCode(" |
||
24 | <iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/{{code}}\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe> |
||
25 | "); |
||
26 | $youtubeVideo->setImageCode("https://img.youtube.com/vi/{{code}}/1.jpg"); |
||
27 | |||
28 | $manager->persist($youtubeVideo); |
||
29 | |||
30 | |||
31 | $dailymotionVideo = new VideoType(); |
||
32 | |||
33 | $dailymotionVideo->setSite("DailyMotion"); |
||
34 | $dailymotionVideo->setCode(" |
||
35 | <iframe frameborder=\"0\" width=\"100%\" height=\"100%\" src=\"https://www.dailymotion.com/embed/video/{{code}}\" allowfullscreen allow=\"autoplay\"></iframe> |
||
36 | "); |
||
37 | $dailymotionVideo->setImageCode("https://www.dailymotion.com/thumbnail/video/{{code}}"); |
||
38 | |||
39 | |||
40 | $manager->persist($dailymotionVideo); |
||
41 | |||
42 | $twitchVideo = new VideoType(); |
||
43 | |||
44 | $twitchVideo->setSite("Twitch"); |
||
45 | $twitchVideo->setCode(" |
||
46 | <iframe src=\"https://player.twitch.tv/?autoplay=false&video={{code}}\" frameborder=\"0\" allowfullscreen=\"true\" scrolling=\"no\" height=\"100%\" width=\"100%\"></iframe> |
||
47 | "); |
||
48 | $twitchVideo->setImageCode("https://www.twitch.tv/p/assets/uploads/combologo_474x356.png"); |
||
49 | |||
50 | $manager->persist($twitchVideo); |
||
51 | |||
52 | $manager->flush(); |
||
53 | |||
55 | } |