Esempio n. 1
0
 /**
  * get HTML representation of the carousel
  */
 public static function getCarousel($plugins)
 {
     // create the carousel items
     $plugin_carousel_items = '';
     // by looping through all plugins
     foreach ($plugins as $p) {
         // new template for each plugin
         $v = new Template('plugin_carousel_item.html');
         $v->replace('IMAGE', PluginC::getIcon($p['name']));
         $v->replace('PLUGIN_NAME', $p['name']);
         $plugin_carousel_items .= $v;
     }
     // carousel template
     $t = new Template('plugin_carousel.html');
     // replace in template
     $t->replace('PLUGIN_CAROUSEL_ITEMS', $plugin_carousel_items);
     return $t;
 }