3require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
 
   56    public function __construct($a_parent_gui, $a_parent_cmd = 
"")
 
   60        $this->lng = 
$DIC->language();
 
   62        $this->ctrl = 
$DIC->ctrl();
 
   63        $this->tpl = 
$DIC[
"tpl"];
 
   64        $this->obj_definition = 
$DIC[
"objDefinition"];
 
   65        $this->access = 
$DIC->access();
 
   66        $this->tree = 
$DIC->repositoryTree();
 
   67        $this->parent_gui = $a_parent_gui;
 
   68        $this->parent_cmd = $a_parent_cmd;
 
   83        if (!is_array($a_ids) || count($a_ids) == 0) {
 
   89        $a_ids = array_unique((array) $a_ids);
 
   91        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
   94        if (!$a_supress_message) {
 
   95            $msg = 
$lng->txt(
"info_delete_sure");
 
   98                $msg .= 
"<br/>" . 
$lng->txt(
"info_delete_warning_no_trash");
 
  101            $cgui->setHeaderText($msg);
 
  103        $cgui->setFormAction(
$ilCtrl->getFormAction($this->parent_gui));
 
  104        $cgui->setCancel(
$lng->txt(
"cancel"), 
"cancelDelete");
 
  105        $cgui->setConfirm(
$lng->txt(
"confirm"), 
"confirmedDelete");
 
  107        $form_name = 
"cgui_" . md5(uniqid());
 
  108        $cgui->setFormName($form_name);
 
  111        foreach ($a_ids as $ref_id) {
 
  115            $alt = ($objDefinition->isPlugin(
$type))
 
  133        if (is_array($deps) && count($deps) > 0) {
 
  134            include_once(
"./Services/Repository/classes/class.ilRepDependenciesTableGUI.php");
 
  136            $deps_html = 
"<br/><br/>" . 
$tab->getHTML();
 
  139        $tpl->setContent($cgui->getHTML() . $deps_html);
 
  160        if (
sizeof($all_refs) > 1) {
 
  161            $lng->loadLanguageModule(
"rep");
 
  166            foreach ($all_refs as $mref_id) {
 
  168                if ($mref_id != $a_ref_id && !
$tree->isDeleted($mref_id)) {
 
  169                    if ($ilAccess->checkAccess(
"read", 
"", $mref_id)) {
 
  171                        if ($ilAccess->checkAccess(
"delete", 
"", $mref_id)) {
 
  176                        $items[] = array(
"id" => $mref_id,
 
  177                            "path" => array_shift($this->
buildPath(array($mref_id))),
 
  178                            "delete" => $may_delete);
 
  188            $tpl = 
new ilTemplate(
"tpl.rep_multi_ref.html", 
true, 
true, 
"Services/Repository");
 
  190            $tpl->setVariable(
"TXT_INTRO", 
$lng->txt(
"rep_multiple_reference_deletion_intro"));
 
  192            if ($may_delete_any) {
 
  193                $tpl->setVariable(
"TXT_INSTRUCTION", 
$lng->txt(
"rep_multiple_reference_deletion_instruction"));
 
  197                $var_name = 
"mref_id[]";
 
  199                foreach ($items as $item) {
 
  200                    if ($item[
"delete"]) {
 
  201                        $tpl->setCurrentBlock(
"cbox");
 
  202                        $tpl->setVariable(
"ITEM_NAME", $var_name);
 
  203                        $tpl->setVariable(
"ITEM_VALUE", $item[
"id"]);
 
  204                        $tpl->parseCurrentBlock();
 
  206                        $tpl->setCurrentBlock(
"item_info");
 
  207                        $tpl->setVariable(
"TXT_ITEM_INFO", 
$lng->txt(
"rep_no_permission_to_delete"));
 
  208                        $tpl->parseCurrentBlock();
 
  211                    $tpl->setCurrentBlock(
"item");
 
  212                    $tpl->setVariable(
"ITEM_TITLE", $item[
"path"]);
 
  213                    $tpl->parseCurrentBlock();
 
  216                if ($may_delete_any > 1) {
 
  217                    $tpl->setCurrentBlock(
"cbox");
 
  218                    $tpl->setVariable(
"ITEM_NAME", 
"sall_" . $a_ref_id);
 
  219                    $tpl->setVariable(
"ITEM_VALUE", 
"");
 
  220                    $tpl->setVariable(
"ITEM_ADD", 
" onclick=\"il.Util.setChecked('" .
 
  221                        $a_form_name . 
"', '" . $var_name . 
"', document." . $a_form_name .
 
  222                        ".sall_" . $a_ref_id . 
".checked)\"");
 
  223                    $tpl->parseCurrentBlock();
 
  225                    $tpl->setCurrentBlock(
"item");
 
  226                    $tpl->setVariable(
"ITEM_TITLE", 
$lng->txt(
"select_all"));
 
  227                    $tpl->parseCurrentBlock();
 
  232                $tpl->setCurrentBlock(
"add_info");
 
  234                    "TXT_ADDITIONAL_INFO",
 
  237                $tpl->parseCurrentBlock();
 
  255        $objects = 
$tree->getSavedNodeData($a_ref_id);
 
  257        if (count($objects) == 0) {
 
  261        include_once(
"./Services/Repository/classes/class.ilTrashTableGUI.php");
 
  263        $ttab->setData($objects);
 
  265        $tpl->setContent($ttab->getHTML());
 
  278        if (!is_array($a_ref_ids) || count($a_ref_ids) == 0) {
 
  283                include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
 
  286            } 
catch (Exception $e) {
 
  302        if (!is_array($a_ref_ids) || count($a_ref_ids) == 0) {
 
  306            include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
 
  314            } 
catch (Exception $e) {
 
  328        if (!is_array($a_ref_ids) || count($a_ref_ids) == 0) {
 
  332            include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
 
  336            } 
catch (Exception $e) {
 
  355        include_once 
'Services/Link/classes/class.ilLink.php';
 
  357        if (!count($ref_ids)) {
 
  362        foreach ($ref_ids as $ref_id) {
 
  364            $path_full = 
$tree->getPathFull($ref_id);
 
  365            foreach ($path_full as $idx => 
$data) {
 
  367                    $path .= 
" » ";
 
  369                if ($ref_id != 
$data[
'ref_id']) {
 
  372                    $path .= (
'<a target="_top" href="' .
 
  374                              $data[
'title'] . 
'</a>');
 
  394        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  396        if (!is_array($a_ids)) {
 
  397            $a_ids = array($a_ids);
 
  401        $cgui->setFormAction(
$ilCtrl->getFormAction($this->parent_gui));
 
  402        $cgui->setCancel(
$lng->txt(
"cancel"), 
"trash");
 
  403        $cgui->setConfirm(
$lng->txt(
"confirm"), 
"removeFromSystem");
 
  404        $cgui->setFormName(
"trash_confirmation");
 
  405        $cgui->setHeaderText(
$lng->txt(
"info_delete_sure"));
 
  407        foreach ($a_ids as 
$id) {
 
  411            $alt = ($objDefinition->isPlugin(
$type))
 
  424        $tpl->setContent($cgui->getHTML());
 
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getClassByType($a_obj_type)
Get class by type.
static lookupTxtById($plugin_id, $lang_var)
static _lookupObjId($a_id)
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _getAllReferences($a_id)
get all reference ids of object
static collectDeletionDependencies(&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
Collect deletion dependencies.
static _lookupType($a_id, $a_reference=false)
lookup object type
Repository GUI Utilities.
showDeleteConfirmation($a_ids, $a_supress_message=false)
Show delete confirmation table.
restoreObjects($a_cur_ref_id, $a_ref_ids)
Restore objects from trash.
deleteObjects($a_cur_ref_id, $a_ref_ids)
Delete objects.
__construct($a_parent_gui, $a_parent_cmd="")
Constructor.
buildPath($ref_ids)
Build path with deep-link.
showTrashTable($a_ref_id)
Get trashed objects for a container.
removeObjectsFromSystem($a_ref_ids, $a_from_recovery_folder=false)
Remove objects from system.
handleMultiReferences($a_obj_id, $a_ref_id, $a_form_name)
Build subitem list for multiple references.
confirmRemoveFromSystemObject($a_ids)
Confirmation for trash.
static deleteObjects($a_cur_ref_id, $a_ids)
Delete objects.
static restoreObjects($a_cur_ref_id, $a_ref_ids)
Move objects from trash back to repository.
static removeObjectsFromSystem($a_ref_ids, $a_from_recovery_folder=false)
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
special template class to simplify handling of ITX/PEAR
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id