/**
  * Edit preview settings.
  */
 public function editPreviewSettings()
 {
     global $rbacsystem, $ilErr, $tpl, $lng;
     $this->tabs_gui->setTabActive('preview_settings');
     if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
         $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
     }
     // set warning if ghostscript not installed
     if (!is_file(PATH_TO_GHOSTSCRIPT)) {
         ilUtil::sendInfo($lng->txt("ghostscript_not_configured"));
     }
     // get form
     $form = $this->initPreviewSettingsForm();
     // set current values
     require_once "Services/Preview/classes/class.ilPreviewSettings.php";
     $val = array();
     $val["enable_preview"] = ilPreviewSettings::isPreviewEnabled();
     $val["max_previews_per_object"] = ilPreviewSettings::getMaximumPreviews();
     $form->setValuesByArray($val);
     $html = $form->getHTML();
     // build renderer HTML
     require_once "Services/Preview/classes/class.ilRendererFactory.php";
     require_once "Services/Preview/classes/class.ilRendererTableGUI.php";
     $renderers = ilRendererFactory::getRenderers();
     $table = new ilRendererTableGUI($this, array("editPreviewSettings", "view"));
     $table->setMaxCount(sizeof($renderers));
     $table->setData($renderers);
     $html .= "<br/>" . $table->getHTML();
     // set content
     $tpl->setContent($html);
 }
 /**
  * Gets the maximum number of preview pictures per object.
  * 
  * @return int The current value
  */
 protected final function getMaximumNumberOfPreviews()
 {
     return ilPreviewSettings::getMaximumPreviews();
 }