예제 #1
0
 private static function _addPlayerElement()
 {
     if (element_exists(ElementSet::ITEM_TYPE_NAME, 'Player')) {
         return;
     }
     $db = get_db();
     $table = $db->getTable('ItemType');
     $mpType = $table->findByName('Moving Image');
     if (!is_object($mpType)) {
         $mpType = new ItemType();
         $mpType->name = "Moving Image";
         $mpType->description = "A series of visual representations imparting an impression of motion when shown in succession. Examples include animations, movies, television programs, videos, zoetropes, or visual output from a simulation.";
         $mpType->save();
     }
     $mpType->addElements(array(array('name' => 'Player', 'description' => 'html for embedded player to stream video content')));
     $mpType->save();
 }