Example #1
0
 /**
  * Display an action button for an extension
  *
  * @param string                            $action    The action
  * @param helper_plugin_extension_extension $extension The extension
  * @return string The HTML code
  */
 function make_action($action, $extension)
 {
     $title = '';
     switch ($action) {
         case 'install':
         case 'reinstall':
             $title = 'title="' . hsc($extension->getDownloadURL()) . '"';
             break;
     }
     $classes = 'button ' . $action;
     $name = 'fn[' . $action . '][' . hsc($extension->getID()) . ']';
     return '<input class="' . $classes . '" name="' . $name . '" type="submit" value="' . $this->getLang('btn_' . $action) . '" ' . $title . ' />';
 }