/**
  * Gets the xml metadata so it can be stored with the file in reason-managed mode
  * This method grabs the appropriate entitites
  * and then uses build_xml_for_av() to actually generate the XML
  * @return string XML representation of the av_file entitiy and its related av item
  */
 function get_meta_info()
 {
     $e = new entity($this->manager->get_value('id'));
     $av = $e->get_right_relationship('av_to_av_file');
     if (!empty($av)) {
         $entities = array(current($av), $e);
     } else {
         $entities = array($e);
     }
     return $this->build_xml_for_av($entities);
 }
 if ($e->get_value('url')) {
     $avd = new reasonAVDisplay();
     $embed_markup = $avd->get_embedding_markup($id);
     if (empty($embed_markup)) {
         $embed_markup = '<a href="' . $e->get_value('url') . '">' . $e->get_value('url') . '</a>';
     } else {
         $tech_note = $avd->get_tech_note($id);
         if (!empty($tech_note)) {
             $embed_markup .= '<div class="techNote">' . $tech_note . '</div>' . "\n";
         }
     }
 } else {
     $embed_markup = 'Please contact site maintainer for this file (No URL provided)';
 }
 $GLOBALS['_reason_media_popup_data']['embed_markup'] = $embed_markup;
 $rel = $e->get_right_relationship('av_to_av_file');
 if ($rel) {
     reset($rel);
     $rel = current($rel);
     $GLOBALS['_reason_media_popup_data']['desc'] = $rel->get_value('description');
     $GLOBALS['_reason_media_popup_data']['title'] = $rel->get_value('name');
 } else {
     $GLOBALS['_reason_media_popup_data']['desc'] = '';
     $GLOBALS['_reason_media_popup_data']['title'] = $e->get_value('name');
 }
 if (defined('MEDIA_POPUP_TEMPLATE_FILENAME')) {
     $template_path = 'popup_templates/' . MEDIA_POPUP_TEMPLATE_FILENAME;
 } else {
     $template_path = 'popup_templates/generic_media_popup_template.php';
 }
 if (reason_file_exists($template_path)) {