/** * Submit the icons form */ function submitFormIcons() { global $ilCtrl, $ilTabs, $lng, $tpl; $ilTabs->activateSubTab('type_icons'); $type_id = $this->type->getTypeId(); $this->initFormIcons(); if (!$this->form->checkInput()) { $this->form->setValuesByPost(); $tpl->setContent($this->form->getHTML()); return; } if ($_POST["svg_icon_delete"]) { ilExternalContentPlugin::_removeIcon("svg", "type", $type_id); } if ($_POST["big_icon_delete"]) { ilExternalContentPlugin::_removeIcon("big", "type", $type_id); } if ($_POST["small_icon_delete"]) { ilExternalContentPlugin::_removeIcon("small", "type", $type_id); } if ($_POST["tiny_icon_delete"]) { ilExternalContentPlugin::_removeIcon("tiny", "type", $type_id); } ilExternalContentPlugin::_saveIcon($_FILES["svg_icon"]['tmp_name'], "svg", "type", $type_id); ilExternalContentPlugin::_saveIcon($_FILES["big_icon"]['tmp_name'], "big", "type", $type_id); ilExternalContentPlugin::_saveIcon($_FILES["small_icon"]['tmp_name'], "small", "type", $type_id); ilExternalContentPlugin::_saveIcon($_FILES["tiny_icon"]['tmp_name'], "tiny", "type", $type_id); ilUtil::sendSuccess($this->plugin_object->txt('icons_saved'), true); $ilCtrl->redirect($this, 'editIcons'); }
/** * Delete * * @access public */ public function delete() { global $ilDB; ilExternalContentPlugin::_deleteWebspaceDir("type", $this->getTypeId()); $query = "DELETE FROM xxco_data_types " . "WHERE type_id = " . $ilDB->quote($this->getTypeId(), 'integer'); $ilDB->manipulate($query); return true; }