protected function _xmodule()
 {
     $str = StringUtils::l("{% begin contents %}");
     if (!empty($this->js)) {
         $str .= StringUtils::l('<script type="text/javascript">');
         $str .= StringUtils::l();
         if (!self::$printedFieldClasses) {
             $str .= StringUtils::l($this->_buildFieldClasses());
             self::$printedFieldClasses = true;
         }
         $str .= StringUtils::l();
         $str .= StringUtils::l('    $(document).ready(function() {');
         $str .= StringUtils::l();
         foreach ((array) $this->js as $line) {
             $str .= StringUtils::l($line);
         }
         $str .= StringUtils::l();
         $str .= StringUtils::l('    });');
         $str .= StringUtils::l();
         $str .= StringUtils::l('</script>');
     }
     if (!empty($this->xhtml)) {
         foreach ((array) $this->xhtml as $line) {
             $str .= StringUtils::l($line);
         }
     }
     $str .= StringUtils::l("{% end %}");
     return $str;
 }
 protected function _buildWidgetOptions($schemafield, $attributes)
 {
     $opt = parent::_buildWidgetOptions($schemafield, $attributes);
     if (!empty($attributes['depends-on'])) {
         $opt[] = "\t\t\tDependsOn: '" . $attributes['depends-on'] . "'";
     }
     if (!empty($attributes['provider-for'])) {
         $opt[] = "\t\t\tProviderFor: '" . $attributes['provider-for'] . "'";
     }
     return $opt;
 }
 protected function _tagwidget()
 {
     //don't close out the li
     if (!$this->isMediaWidget) {
         return parent::_tagwidget();
     }
 }