00001 <?php
00007 class STransMediaAgentSheetsApplet extends STrans
00008 {
00013 public function doc() {
00014 return "STransMediaImage translates SNAP2 image resources into "
00015 . "embeddable HTML.";
00016 }
00017
00022 public function getInFormat() {
00023 return 'media_agentsheets';
00024 }
00025
00030 public function getOutFormat() {
00031 return 'html';
00032 }
00033
00040 public function translate($si) {
00041 $version = $si->getOption('_version');
00042 $resource = $si->getOption('_resource');
00043
00044
00045
00046
00047
00048
00049 $html = $version->getContentModule()->getHTML();
00050
00051 if($html === false)
00052 $html = "<div style=\"padding: 4px; border: 1px solid black; "
00053 . "background-color: #E0E0E0; width: 8em; text-align: center;\">No Content</div>";
00054
00055 $this->sendToTarget($si, $html);
00056
00057 return true;
00058 }
00059 }
00060
00061 ?>