00001 <?php
00009 class STransMediaInteractivateApplet extends STrans
00010 {
00015 public function doc() {
00016 return "STransMediaImage translates SNAP2 image resources into "
00017 . "embeddable HTML.";
00018 }
00019
00024 public function getInFormat() {
00025 return 'media_interactivate';
00026 }
00027
00032 public function getOutFormat() {
00033 return 'html';
00034 }
00035
00042 public function translate($si) {
00043 $loginInfo = $si->getOption('loginInfo');
00044 $activityId = $si->getOption('activityId');
00045 $switcherPath = $si->getOption('switcherPath');
00046
00047 $html = $si->getSource()->getHTML(array('loginInfo' => $loginInfo, 'activityId' => $activityId,
00048 'switcherPath' => $switcherPath));
00049
00050 if($html === false)
00051 $html = "<div style=\"padding: 4px; border: 1px solid black; "
00052 . "background-color: #E0E0E0; width: 8em; text-align: center;\">No Content</div>";
00053
00054 $this->sendToTarget($si, $html);
00055
00056 return true;
00057 }
00058 }
00059
00060 ?>