Browse Source

Ajout de fixtures (elements)

bastien 13 years ago
parent
commit
91639672ff

+ 58 - 12
src/Muzich/CoreBundle/DataFixtures/ORM/LoadElementData.php View File

@@ -37,13 +37,19 @@ class LoadElementData  extends AbstractFixture implements OrderedFixtureInterfac
37 37
   /**
38 38
    *  
39 39
    */
40
-  protected function createElement($reference_id, $name, $url, $tags, $type, $owner, $group = null)
40
+  protected function createElement($reference_id, $name, $url, $tags, $type, $owner, $group = null, $date = null)
41 41
   {    
42 42
     $element = new Element();
43 43
     $element->setName(ucfirst($name));
44 44
     $element->setUrl($url);
45 45
     $element->setType($type);
46 46
     $element->setOwner($owner);
47
+    if ($date)
48
+    {
49
+      $date_object = new \DateTime($date);
50
+      $element->setCreated($date_object);
51
+      $element->setUpdated($date_object);
52
+    }
47 53
     if ($group)
48 54
       $element->setGroup($group);
49 55
     $this->addReference('element_'.$reference_id, $element);
@@ -84,60 +90,61 @@ class LoadElementData  extends AbstractFixture implements OrderedFixtureInterfac
84 90
     $this->createElement('youtube_heretik_1', 'Heretik System Popof - Resistance', 
85 91
       'http://www.youtube.com/watch?v=tq4DjQK7nsM',
86 92
       $this->getArrayOfTag(array('hardtek')),
87
-    $youtube, $bux);
93
+    $youtube, $bux, null, '2011-12-10 17:35:07');
88 94
     
89 95
     $this->createElement('youtube_dtc_passdrop', 'dtc che passdrop', 
90 96
       'http://www.youtube.com/watch?v=2A4buFCp7qM', 
91 97
       $this->getArrayOfTag(array('hardtek')),
92
-    $youtube, $bux);
98
+    $youtube, $bux, null, '2011-12-10 18:35:07');
93 99
     
94 100
     $this->createElement('youtube_antroppod_1', 'Antropod - Polakatek', 
95 101
       'http://www.youtube.com/watch?v=VvpF3lCh1hk&NR=1', 
96 102
       $this->getArrayOfTag(array('hardtek')),
97
-    $youtube, $bux);
103
+    $youtube, $bux, null, '2011-12-10 19:45:07');
98 104
     
99 105
     $this->createElement('youtube_koinkoin_1', 'koinkOin - H5N1', 
100 106
       'http://www.son2teuf.org/Voir-details/Sons/Lives/Hardtek-_-Tribe/koinkOin-_-H5N1', 
101 107
       $this->getArrayOfTag(array('hardtek', 'electro')),
102
-    $youtube, $bux);
108
+    $youtube, $bux, null, '2011-12-10 21:35:07');
103 109
     
104 110
     
105 111
     $this->createElement('youtube_djfab_1', 'DJ FAB', 
106 112
       'http://www.jamendo.com/fr/album/42567', 
107 113
       $this->getArrayOfTag(array('hardtek')),
108
-    $jamendo, $jean);
114
+    $jamendo, $jean, null, '2011-11-11 17:35:07');
109 115
     
110 116
     $this->createElement('youtube_djantoine_1', 'dj antoine', 
111 117
       'http://www.jamendo.com/fr/album/75206', 
112 118
       $this->getArrayOfTag(array('hardtek', 'tribe')),
113
-    $jamendo, $jean);
119
+    $jamendo, $jean, null, '2011-11-11 19:35:07');
114 120
     
115 121
     $this->createElement('youtube_acroyek_1', 'Acrotek Hardtek G01', 
116 122
       'http://www.jamendo.com/fr/album/3409', 
117 123
       $this->getArrayOfTag(array('hardtek')),
118
-    $jamendo, $jean);
124
+    $jamendo, $jean, null, '2011-12-11 14:35:07');
119 125
     
120 126
     
121 127
     $this->createElement('jamendo_caio_1', 'All Is Full Of Pain', 
122 128
       'http://soundcloud.com/keytek/all-is-full-of-pain', 
123 129
       $this->getArrayOfTag(array('tribe', 'hardtek')),
124
-    $soundclound, $paul);
130
+    $soundclound, $paul, null, '2011-12-02 01:35:07');
125 131
     
126 132
     $this->createElement('jamendo_reverb_1', 'RE-FUCK (ReVeRB_FBC) mix.', 
127 133
       'http://soundcloud.com/reverb-2/re-fuck-reverb_fbc-mix', 
128 134
       $this->getArrayOfTag(array('tribe')),
129
-    $soundclound, $paul);
135
+    $soundclound, $paul, null, '2011-12-04 14:35:07');
130 136
     
131 137
     $this->createElement('jamendo_cardio_1', 'CardioT3K - Juggernaut Trap', 
132 138
       'http://soundcloud.com/cardiot3k/cardiot3k-juggernaut-trap', 
133 139
       $this->getArrayOfTag(array('tribe')),
134
-    $soundclound, $paul);
140
+    $soundclound, $paul, null, '2011-12-12 13:35:07');
135 141
     
136 142
     $this->createElement('dudeldrum', 'DUDELDRUM', 
137 143
       'http://www.jamendo.com/fr/album/89109', 
138 144
       $this->getArrayOfTag(array('medieval')),
139 145
       $jamendo, $joelle,
140 146
       $this->entity_manager->merge($this->getReference('group_dudeldrum'))
147
+      , '2011-12-16 18:11:07'
141 148
     );
142 149
     
143 150
     $this->createElement('infected_psycho', 'Infected Mushroom - Psycho', 
@@ -145,6 +152,7 @@ class LoadElementData  extends AbstractFixture implements OrderedFixtureInterfac
145 152
       $this->getArrayOfTag(array('psytrance')),
146 153
       $youtube, $paul,
147 154
       $this->entity_manager->merge($this->getReference('group_fan_de_psytrance'))
155
+      , '2011-12-10 16:11:17'
148 156
     );
149 157
     
150 158
     $this->createElement('infected_muse', 'Infected mushroom - Muse Breaks', 
@@ -152,12 +160,13 @@ class LoadElementData  extends AbstractFixture implements OrderedFixtureInterfac
152 160
       $this->getArrayOfTag(array('psytrance')),
153 161
       $youtube, $bob,
154 162
       $this->entity_manager->merge($this->getReference('group_fan_de_psytrance'))
163
+      , '2011-12-08 17:35:07'
155 164
     );
156 165
     
157 166
     $this->createElement('joelle_1', 'Cents Pas - Joëlle', 
158 167
       'http://www.youtube.com/watch?v=bIAFB4vRdGw', 
159 168
       $this->getArrayOfTag(array('chanteuse')),
160
-      $youtube, $joelle
169
+      $youtube, $joelle, null, '2011-12-08 14:21:07'
161 170
     );
162 171
     
163 172
     $this->createElement('joelle_2', 'Cents Pas - Joëlle (bis)', 
@@ -165,6 +174,43 @@ class LoadElementData  extends AbstractFixture implements OrderedFixtureInterfac
165 174
       $this->getArrayOfTag(array('chanteuse')),
166 175
       $youtube, $joelle,
167 176
       $this->entity_manager->merge($this->getReference('group_joelle'))
177
+      , '2011-12-07 14:12:07'
178
+    );
179
+    
180
+    $this->createElement('ukf_1', 'UKF Dubstep Mix - August ', 
181
+      'http://www.youtube.com/watch?v=SFu2DfPDGeU', 
182
+      $this->getArrayOfTag(array('dubstep')),
183
+      $youtube, $joelle, null, '2011-12-10 00:35:07'
184
+    );
185
+    
186
+    $this->createElement('beatbox_1', 'Dubstep Beatbox', 
187
+      'http://www.dailymotion.com/video/xm5omz_dubstep-beatbox_creation', 
188
+      $this->getArrayOfTag(array('dubstep', 'beatbox')),
189
+      null, $joelle, null, '2011-12-10 11:11:11'
190
+    );
191
+    
192
+    $this->createElement('soulfly_1', 'SOULFLY - Prophecy', 
193
+      'http://www.youtube.com/watch?v=zCc_jLctZkA', 
194
+      $this->getArrayOfTag(array('metal')),
195
+      $youtube, $bux, null, '2011-12-12 17:39:07'
196
+    );
197
+    
198
+    $this->createElement('azyd_azylum_1', 'AZYD AZYLUM Live au Café Provisoire', 
199
+      'http://www.youtube.com/watch?v=8AXhRXAt2E4', 
200
+      $this->getArrayOfTag(array('metal')),
201
+      $youtube, $bux, null, '2011-11-11 11:11:11'
202
+    );
203
+    
204
+    $this->createElement('babylon_pression_1', 'Babylon Pression - Des Tasers et des Pauvres', 
205
+      'http://www.youtube.com/watch?v=XWkbaHxRvds&feature=related', 
206
+      $this->getArrayOfTag(array('metal', 'hardcore')),
207
+      $youtube, $bux, null, '2011-12-14 18:35:07'
208
+    );
209
+    
210
+    $this->createElement('ed_cox_1', 'Ed Cox - La fanfare des teuffeurs (Hardcordian)', 
211
+      'http://www.youtube.com/watch?v=Lk1gnh-JCDs&feature=related', 
212
+      $this->getArrayOfTag(array('electro')),
213
+      $youtube, $bux, null, '2011-12-15 21:35:07'
168 214
     );
169 215
     
170 216
 

+ 1 - 0
src/Muzich/CoreBundle/DataFixtures/ORM/LoadTagData.php View File

@@ -46,6 +46,7 @@ class LoadTagData  extends AbstractFixture implements OrderedFixtureInterface, C
46 46
       'keyboard', 'latin',  'latino',  'live', 'lofi', 'lounge', 'meditation', 
47 47
       'melancolique', 'mellow',  'melodique', 'metal','metalcore','minimal', 
48 48
       'minimalism', 'minimaltechno', 'mix', 'movie', 'medieval', 'psytrance', 'chanteuse'
49
+      , 'dubstep', 'drum and bass', 'beatbox', 'hardcore'
49 50
       
50 51
       ) as $tag_name)
51 52
     {