5require_once 
"./Services/Object/classes/class.ilObject2GUI.php";
 
    6include_once(
'./Modules/WebResource/classes/class.ilParameterAppender.php');
 
    7require_once 
'Services/LinkChecker/interfaces/interface.ilLinkCheckerGUIRowHandling.php';
 
   42        $ilTabs = 
$DIC[
'ilTabs'];
 
   44        $ilAccess = 
$DIC[
'ilAccess'];
 
   48        if (
$_GET[
"baseClass"] == 
'ilLinkResourceHandlerGUI') {
 
   50            $ilCtrl->saveParameter($this, 
'view_mode');
 
   54        $this->lng->loadLanguageModule(
"webr");
 
   56        $next_class = $this->ctrl->getNextClass($this);
 
   57        $cmd = $this->ctrl->getCmd();
 
   59        switch ($next_class) {
 
   60            case "ilinfoscreengui":
 
   65            case 'ilobjectmetadatagui':
 
   68                $ilTabs->activateTab(
'id_meta_data');
 
   69                include_once 
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
 
   71                $this->ctrl->forwardCommand($md_gui);
 
   74            case 'ilpermissiongui':
 
   76                $ilTabs->activateTab(
'id_permissions');
 
   77                include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
 
   79                $ret = &$this->ctrl->forwardCommand($perm_gui);
 
   82            case 'ilobjectcopygui':
 
   84                include_once 
'./Services/Object/classes/class.ilObjectCopyGUI.php';
 
   87                $this->ctrl->forwardCommand($cp);
 
   92                $this->tabs_gui->setTabActive(
'export');
 
   93                include_once 
'./Services/Export/classes/class.ilExportGUI.php';
 
   95                $exp->addFormat(
'xml');
 
   96                $this->ctrl->forwardCommand($exp);
 
   99            case "ilcommonactiondispatchergui":
 
  100                include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
 
  102                $this->ctrl->forwardCommand($gui);
 
  105            case "ilpropertyformgui":
 
  106                include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  108                $this->ctrl->forwardCommand($this->form);
 
  111            case "ilinternallinkgui":
 
  112                $this->lng->loadLanguageModule(
"content");
 
  113                require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
 
  115                $link_gui->filterLinkType(
"PageObject");
 
  116                $link_gui->filterLinkType(
"GlossaryItem");
 
  117                $link_gui->filterLinkType(
"RepositoryItem");
 
  118                $link_gui->setFilterWhiteList(
true);
 
  119                $ilCtrl->forwardCommand($link_gui);
 
  124                    $this->ctrl->setCmd(
"view");
 
  126                parent::executeCommand();
 
  131            include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
 
  164            $this->form->setValuesByPost();
 
  165            $this->tpl->setContent($this->form->getHTML());
 
  172        $this->link->setLinkResourceId($a_new_object->
getId());
 
  173        $link_id = $this->link->add();
 
  174        $this->link->updateValid(
true);
 
  176        ilUtil::sendSuccess($this->lng->txt(
'webr_link_added'));
 
  179        if ($this->id_type == self::WORKSPACE_NODE_ID) {
 
  180            $this->ctrl->redirect($this, 
"editLinks");
 
  185                $a_new_object->
getRefId() . 
"&cmd=switchViewMode&switch_mode=2");
 
  198        $ilTabs = 
$DIC[
'ilTabs'];
 
  201        $ilTabs->activateTab(
'id_settings');
 
  204        $this->tpl->setContent($this->form->getHTML());
 
  216        $ilTabs = 
$DIC[
'ilTabs'];
 
  219        $ilTabs->activateTab(
'id_settings');
 
  222        if ($this->form->checkInput()) {
 
  223            $this->
object->setTitle($this->form->getInput(
'tit'));
 
  224            $this->
object->setDescription($this->form->getInput(
'des'));
 
  225            $this->
object->update();
 
  227            include_once 
'./Services/Container/classes/class.ilContainerSortingSettings.php';
 
  229            $sort->setSortMode($this->form->getInput(
'sor'));
 
  233            $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->saveTileImage();
 
  236            ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
  237            $this->ctrl->redirect($this, 
'settings');
 
  240        $this->form->setValuesByPost();
 
  242        $this->tpl->setContent($this->form->getHTML());
 
  254        include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  256        $this->form->setFormAction($this->ctrl->getFormAction($this, 
'saveSettings'));
 
  257        $this->form->setTitle($this->lng->txt(
'webr_edit_settings'));
 
  260        $tit = 
new ilTextInputGUI($this->lng->txt(
'webr_list_title'), 
'tit');
 
  261        $tit->setValue($this->object->getTitle());
 
  262        $tit->setRequired(
true);
 
  264        $tit->setMaxLength(127);
 
  265        $this->form->addItem($tit);
 
  269        $des->setValue($this->object->getDescription());
 
  272        $this->form->addItem($des);
 
  275        $section->setTitle($this->lng->txt(
'obj_presentation'));
 
  279        $obj_service->commonSettings()->legacyForm($this->form, $this->
object)->addTileImage();
 
  282        include_once 
'./Services/Container/classes/class.ilContainerSortingSettings.php';
 
  283        include_once 
'./Services/Container/classes/class.ilContainer.php';
 
  286        $sor->setRequired(
true);
 
  287        include_once 
'./Services/Container/classes/class.ilContainerSortingSettings.php';
 
  291            $this->lng->txt(
'webr_sort_title'),
 
  294        $sor->addOption($opt);
 
  297            $this->lng->txt(
'webr_sort_manual'),
 
  300        $sor->addOption($opm);
 
  301        $this->form->addItem($sor);
 
  303        $this->form->addCommandButton(
'saveSettings', $this->lng->txt(
'save'));
 
  304        $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
 
  321        if (!(
int) 
$_GET[
'link_id']) {
 
  323            $ilCtrl->redirect($this, 
'view');
 
  328        $this->tpl->setContent($this->form->getHTML());
 
  342        if ($this->
checkLinkInput(self::LINK_MOD_EDIT, $this->object->getId(), (
int) $_REQUEST[
'link_id'])) {
 
  343            $this->link->setLinkId((
int) $_REQUEST[
'link_id']);
 
  344            $this->link->update();
 
  346                $this->dynamic->add((
int) $_REQUEST[
'link_id']);
 
  350                $this->
object->setTitle($this->form->getInput(
'tit'));
 
  351                $this->
object->setDescription($this->form->getInput(
'des'));
 
  352                $this->
object->update();
 
  355            ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
  356            $ilCtrl->redirect($this, 
'view');
 
  359        $this->form->setValuesByPost();
 
  360        $this->tpl->setContent($this->form->getHTML());
 
  373        $this->tpl->setContent($this->form->getHTML());
 
  389        if ($this->
checkLinkInput(self::LINK_MOD_ADD, $this->object->getId(), 0)) {
 
  392                $this->
object->setTitle($this->form->getInput(
'lti'));
 
  393                $this->
object->setDescription($this->form->getInput(
'tde'));
 
  394                $this->
object->update();
 
  398            $link_id = $this->link->add();
 
  399            $this->link->updateValid(
true);
 
  403                $this->dynamic->add($link_id);
 
  405            ilUtil::sendSuccess($this->lng->txt(
'webr_link_added'), 
true);
 
  406            $ilCtrl->redirect($this, 
'view');
 
  410        $this->form->setValuesByPost();
 
  413        $this->tpl->setContent($this->form->getHTML());
 
  428        $this->ctrl->setParameter($this, 
'link_id', (
int) 
$_GET[
'link_id']);
 
  430        if (!isset(
$_GET[
'param_id'])) {
 
  432            $ilCtrl->redirect($this, 
'view');
 
  435        include_once 
'./Modules/WebResource/classes/class.ilParameterAppender.php';
 
  437        $param->delete((
int) 
$_GET[
'param_id']);
 
  439        ilUtil::sendSuccess($this->lng->txt(
'links_parameter_deleted'), 
true);
 
  440        $ilCtrl->redirect($this, 
'editLinks');
 
  451        if (!isset(
$_GET[
'param_id'])) {
 
  453            $ilCtrl->redirect($this, 
'view');
 
  456        include_once 
'./Modules/WebResource/classes/class.ilParameterAppender.php';
 
  458        $param->delete((
int) 
$_GET[
'param_id']);
 
  460        ilUtil::sendSuccess($this->lng->txt(
'links_parameter_deleted'), 
true);
 
  461        $ilCtrl->redirect($this, 
'view');
 
  478        if (!is_array(
$_POST[
'ids'])) {
 
  480            $ilCtrl->redirect($this, 
'view');
 
  485        foreach (
$_POST[
'ids'] as $link_id) {
 
  489            if (
$_POST[
'tar_' . $link_id . 
'_ajax_type'] &&
 
  490                $_POST[
'tar_' . $link_id . 
'_ajax_id']) {
 
  492                    $_POST[
'tar_' . $link_id . 
'_ajax_type'] . 
'|' .
 
  493                    $_POST[
'tar_' . $link_id . 
'_ajax_id'];
 
  497            if (!strlen(
$data[
'tit'])) {
 
  498                $invalid[] = $link_id;
 
  501            if (!strlen(
$data[
'tar'])) {
 
  502                $invalid[] = $link_id;
 
  506                $invalid[] = $link_id;
 
  510                $invalid[] = $link_id;
 
  515        if (count($invalid)) {
 
  517            $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.webr_manage.html', 
'Modules/WebResource');
 
  519            include_once 
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
 
  521            $table->setInvalidLinks($invalid);
 
  524            $this->tpl->setVariable(
'TABLE_LINKS', 
$table->getHTML());
 
  528        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
  532        include_once 
'./Services/Form/classes/class.ilFormPropertyGUI.php';
 
  533        include_once 
'./Services/Form/classes/class.ilLinkInputGUI.php';
 
  534        foreach (
$_POST[
'ids'] as $link_id) {
 
  539            $links->setLinkId($link_id);
 
  545            $links->setLastCheckDate($orig[
'last_check']);
 
  553                $param->setValue((
int) 
$data[
'val']);
 
  554                $param->add($link_id);
 
  560                $this->
object->update();
 
  566        ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
  567        $ilCtrl->redirect($this, 
'view');
 
  577        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
  580        $values = $link->getItem($a_link_id);
 
  585        $this->form->setValuesByArray(
 
  589                'des' => 
$values[
'description'],
 
  590                'act' => (
int) 
$values[
'active'],
 
  591                'che' => (
int) 
$values[
'disable_check'],
 
  592                'vali' => (
int) 
$values[
'valid']
 
  607        $valid = $this->form->checkInput();
 
  609        $link_input = $this->form->getInput(
'tar');
 
  611        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
  614        $this->link->setTitle($this->form->getInput(
'tit'));
 
  615        $this->link->setDescription($this->form->getInput(
'des'));
 
  616        $this->link->setDisableCheckStatus($this->form->getInput(
'che'));
 
  619        if ($a_mode == self::LINK_MOD_CREATE) {
 
  620            $this->link->setActiveStatus(
true);
 
  622            $this->link->setActiveStatus($this->form->getInput(
'act'));
 
  625        if ($a_mode == self::LINK_MOD_EDIT) {
 
  626            $this->link->setValidStatus($this->form->getInput(
'vali'));
 
  628            $this->link->setValidStatus(
true);
 
  636        $this->dynamic->setName($this->form->getInput(
'nam'));
 
  637        $this->dynamic->setValue($this->form->getInput(
'val'));
 
  638        if (!$this->dynamic->validate()) {
 
  639            switch ($this->dynamic->getErrorCode()) {
 
  641                    $this->form->getItemByPostVar(
'nam')->setAlert($this->lng->txt(
'links_no_name_given'));
 
  645                    $this->form->getItemByPostVar(
'val')->setAlert($this->lng->txt(
'links_no_value_given'));
 
  652            $this->dynamic = 
null;
 
  667        $ilTabs = 
$DIC[
'ilTabs'];
 
  669        $ilTabs->activateTab(
"id_content");
 
  671        include_once 
'./Services/Form/classes/class.ilPropertyFormGUI.php';
 
  677                $this->ctrl->setParameter($this, 
'new_type', 
'webr');
 
  678                $this->form->setTitle($this->lng->txt(
'webr_new_link'));
 
  679                $this->form->setTableWidth(
'600px');
 
  682                $this->form->addCommandButton(
'save', $this->lng->txt(
'webr_add'));
 
  683                $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
 
  688                $this->form->setTitle($this->lng->txt(
'webr_new_link'));
 
  691                $this->form->addCommandButton(
'saveAddLink', $this->lng->txt(
'webr_add'));
 
  692                $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
 
  697                $this->ctrl->setParameter($this, 
'link_id', (
int) $_REQUEST[
'link_id']);
 
  698                $this->form->setTitle($this->lng->txt(
'webr_edit'));
 
  701                $this->form->addCommandButton(
'updateLink', $this->lng->txt(
'save'));
 
  702                $this->form->addCommandButton(
'view', $this->lng->txt(
'cancel'));
 
  707        $this->form->setFormAction($this->ctrl->getFormAction($this));
 
  713            $this->form->setTitle($this->lng->txt(
'webr_edit_list'));
 
  717            $title->setRequired(
true);
 
  719            $title->setMaxLength(127);
 
  720            $this->form->addItem(
$title);
 
  726            $this->form->addItem($desc);
 
  730            $sect->setTitle($this->lng->txt(
'webr_add'));
 
  731            $this->form->addItem($sect);
 
  742        include_once 
'Services/Form/classes/class.ilLinkInputGUI.php';
 
  743        $tar = 
new ilLinkInputGUI($this->lng->txt(
'webr_link_target'), 
'tar');
 
  744        $tar->setInternalLinkFilterTypes(
 
  752        $tar->setExternalLinkMaxLength(1000);
 
  753        $tar->setInternalLinkFilterTypes(array(
"PageObject", 
"GlossaryItem", 
"RepositoryItem"));
 
  754        $tar->setRequired(
true);
 
  755        $this->form->addItem($tar);
 
  758        $tit = 
new ilTextInputGUI($this->lng->txt(
'webr_link_title'), 
'tit');
 
  759        $tit->setRequired(
true);
 
  761        $tit->setMaxLength(127);
 
  762        $this->form->addItem($tit);
 
  768        $this->form->addItem($des);
 
  771        if ($a_mode != self::LINK_MOD_CREATE) {
 
  774            $act->setChecked(
true);
 
  776            $this->form->addItem($act);
 
  781            $this->form->addItem($che);
 
  785        if ($a_mode == self::LINK_MOD_EDIT) {
 
  787            $this->form->addItem($val);
 
  792            $dyn->setInfo($this->lng->txt(
'links_dynamic_info'));
 
  797                $dyn->addSubItem($ex);
 
  802                    $ptpl = 
new ilTemplate(
'tpl.link_dyn_param_edit.html', 
true, 
true, 
'Modules/WebResource');
 
  804                    $this->ctrl->setParameter($this, 
'param_id', 
$id);
 
  805                    $ptpl->setVariable(
'LINK_DEL', $this->ctrl->getLinkTarget($this, 
'deleteParameterForm'));
 
  806                    $ptpl->setVariable(
'LINK_TXT', $this->lng->txt(
'delete'));
 
  807                    $p->setHtml($ptpl->get());
 
  808                    $dyn->addSubItem($p);
 
  815            if ($a_mode != self::LINK_MOD_CREATE) {
 
  816                #$new = new ilCustomInputGUI($this->lng->txt('links_add_param'),''); 
  817                #$dyn->addSubItem($new); 
  823            $nam->setMaxLength(128);
 
  824            $dyn->addSubItem($nam);
 
  830            $dyn->addSubItem($val);
 
  832            $this->form->addItem($dyn);
 
  843        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
  857        $_REQUEST[
'view_mode'] = 
$_GET[
'view_mode'] = (int) 
$_GET[
'switch_mode'];
 
  881        $ilTabs = 
$DIC[
'ilTabs'];
 
  883        $ilTabs->activateTab(
"id_content");
 
  887        if (strtolower(
$_GET[
"baseClass"]) == 
"iladministrationgui") {
 
  891            switch ((
int) $_REQUEST[
'view_mode']) {
 
  898                    include_once 
'./Services/Container/classes/class.ilContainerSortingSettings.php';
 
  911        $GLOBALS[
'DIC'][
'tpl']->setPermanentLink($this->object->getType(), $this->object->getRefId());
 
  924        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.webr_manage.html', 
'Modules/WebResource');
 
  927        include_once 
'./Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
 
  931        include_once 
'./Services/Link/classes/class.ilInternalLinkGUI.php';
 
  934        $this->tpl->addJavaScript(
"Modules/WebResource/js/intLink.js");
 
  935        $this->tpl->addJavascript(
"Services/Form/js/Form.js");
 
  937        $this->tpl->setVariable(
'TABLE_LINKS', 
$table->getHTML() . 
$js);
 
  949        include_once 
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
 
  953        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.webr_view.html', 
'Modules/WebResource');
 
  955        $this->tpl->setVariable(
'LINK_TABLE', 
$table->getHTML());
 
  967        include_once 
'./Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
 
  971        $this->tpl->addBlockFile(
'ADM_CONTENT', 
'adm_content', 
'tpl.webr_view.html', 
'Modules/WebResource');
 
  973        $this->tpl->setVariable(
'LINK_TABLE', 
$table->getHTML());
 
  984        include_once 
'./Services/Container/classes/class.ilContainerSorting.php';
 
  986        $sort->savePost((array) 
$_POST[
'position']);
 
  988        ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
 1004        include_once 
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
 
 1006        $tool->setFormAction($this->ctrl->getFormAction($this));
 
 1008            $this->lng->txt(
'webr_add'),
 
 1009            $this->ctrl->getLinkTarget($this, 
'addLink')
 
 1012        $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
 
 1025        $link_ids = array();
 
 1027        if (is_array(
$_POST[
'link_ids'])) {
 
 1028            $link_ids = 
$_POST[
'link_ids'];
 
 1029        } elseif (isset(
$_GET[
'link_id'])) {
 
 1030            $link_ids = array(
$_GET[
'link_id']);
 
 1033        if (!count($link_ids) > 0) {
 
 1039        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1042        include_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
 1044        $confirm->setFormAction($this->ctrl->getFormAction($this, 
'view'));
 
 1045        $confirm->setHeaderText($this->lng->txt(
'webr_sure_delete_items'));
 
 1046        $confirm->setConfirm($this->lng->txt(
'delete'), 
'deleteLinks');
 
 1047        $confirm->setCancel($this->lng->txt(
'cancel'), 
'view');
 
 1049        foreach ($link_ids as $link_id) {
 
 1050            $link = 
$links->getItem($link_id);
 
 1051            $confirm->addItem(
'link_ids[]', $link_id, $link[
'title']);
 
 1053        $this->tpl->setContent($confirm->getHTML());
 
 1068        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1071        foreach (
$_POST[
'link_ids'] as $link_id) {
 
 1072            $links->delete($link_id);
 
 1074        ilUtil::sendSuccess($this->lng->txt(
'webr_deleted_items'), 
true);
 
 1075        $ilCtrl->redirect($this, 
'view');
 
 1090        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1093        if (!
$_GET[
'link_id']) {
 
 1095            $ilCtrl->redirect($this, 
'view');
 
 1099        $links->updateActive(
false);
 
 1101        ilUtil::sendSuccess($this->lng->txt(
'webr_inactive_success'), 
true);
 
 1102        $ilCtrl->redirect($this, 
'view');
 
 1113        $this->ctrl->setCmd(
"showSummary");
 
 1114        $this->ctrl->setCmdClass(
"ilinfoscreengui");
 
 1125        $ilTabs = 
$DIC[
'ilTabs'];
 
 1130        $ilTabs->activateTab(
'id_info');
 
 1132        include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
 
 1135        $info->enablePrivateNotes();
 
 1138        $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
 
 1140        if ($this->id_type == self::WORKSPACE_NODE_ID) {
 
 1141            $info->addProperty($this->lng->txt(
"perma_link"), $this->getPermanentLinkWidget());
 
 1145        $this->ctrl->forwardCommand(
$info);
 
 1153        $ilTabs = 
$DIC[
'ilTabs'];
 
 1156        $ilTabs->activateTab(
'id_history');
 
 1158        include_once(
"./Services/History/classes/class.ilHistoryTableGUI.php");
 
 1159        $hist_gui = 
new ilHistoryTableGUI($this, 
"history", $this->object->getId(), $this->object->getType);
 
 1160        $hist_gui->initTable();
 
 1161        $this->tpl->setContent($hist_gui->getHTML());
 
 1174        $this->
object->items_obj->readItem($row[
'page_id']);
 
 1175        $row[
'title'] = $this->
object->items_obj->getTitle();
 
 1177        require_once 
'Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php';
 
 1179        $actions->setSelectionHeaderClass(
'small');
 
 1180        $actions->setItemLinkClass(
'xsmall');
 
 1181        $actions->setListTitle($this->lng->txt(
'actions'));
 
 1183        $this->ctrl->setParameter($this, 
'link_id', 
$row[
'page_id']);
 
 1185            $this->lng->txt(
'edit'),
 
 1187            $this->ctrl->getLinkTarget($this, 
'editLink')
 
 1189        $this->ctrl->clearParameters($this);
 
 1203        $ilias = 
$DIC[
'ilias'];
 
 1206        $ilTabs = 
$DIC[
'ilTabs'];
 
 1209        $ilTabs->activateTab(
'id_link_check');
 
 1212        $this->
object->initLinkResourceItemsObject();
 
 1214        require_once 
'./Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
 
 1218        if ((
bool) $ilias->getSetting(
'cron_web_resource_check')) {
 
 1219            include_once 
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
 
 1220            include_once 
'Services/Form/classes/class.ilPropertyFormGUI.php';
 
 1222            $chb = 
new ilCheckboxInputGUI($this->lng->txt(
'link_check_message_a'), 
'link_check_message');
 
 1225            $chb->setOptionTitle($this->lng->txt(
'link_check_message_b'));
 
 1228            $toolbar->addFormButton($this->lng->txt(
'save'), 
'saveLinkCheck');
 
 1229            $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 
'saveLinkCheck'));
 
 1233        $tgui->setLinkChecker($this->link_checker_obj)
 
 1234             ->setRowHandler($this)
 
 1235             ->setRefreshButton($this->lng->txt(
'refresh'), 
'refreshLinkCheck');
 
 1237        return $tpl->setContent($tgui->prepareHTML()->getHTML() . 
$toolbar->getHTML());
 
 1247        include_once 
'./Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
 
 1250        $link_check_notify->setUserId(
$ilUser->getId());
 
 1251        $link_check_notify->setObjId($this->object->getId());
 
 1253        if (
$_POST[
'link_check_message']) {
 
 1254            ilUtil::sendSuccess($this->lng->txt(
'link_check_message_enabled'));
 
 1255            $link_check_notify->addNotifier();
 
 1257            ilUtil::sendSuccess($this->lng->txt(
'link_check_message_disabled'));
 
 1258            $link_check_notify->deleteNotifier();
 
 1270        $this->
object->initLinkResourceItemsObject();
 
 1273        $this->
object->items_obj->updateValidByCheck();
 
 1275        foreach ($this->link_checker_obj->checkWebResourceLinks() as $invalid) {
 
 1276            $this->
object->items_obj->readItem($invalid[
'page_id']);
 
 1277            $this->
object->items_obj->setActiveStatus(
false);
 
 1278            $this->
object->items_obj->setValidStatus(
false);
 
 1279            $this->
object->items_obj->update(
false);
 
 1282        $this->
object->items_obj->updateLastCheck();
 
 1283        ilUtil::sendSuccess($this->lng->txt(
'link_checker_refreshed'));
 
 1296        include_once 
'./Services/LinkChecker/classes/class.ilLinkChecker.php';
 
 1299        $this->link_checker_obj->setObjId($this->object->getId());
 
 1316        $ilTabs = 
$DIC[
'ilTabs'];
 
 1319        switch ($a_active_tab) {
 
 1322                    $this->lng->loadLanguageModule(
'cntr');
 
 1324                    $this->ctrl->setParameter($this, 
'switch_mode', self::VIEW_MODE_VIEW);
 
 1328                        $this->ctrl->getLinkTarget($this, 
'switchViewMode')
 
 1330                    $this->ctrl->setParameter($this, 
'switch_mode', self::VIEW_MODE_MANAGE);
 
 1332                        'id_content_manage',
 
 1333                        $lng->txt(
'cntr_manage'),
 
 1334                        $this->ctrl->getLinkTarget($this, 
'switchViewMode')
 
 1336                    include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1337                    include_once 
'./Services/Container/classes/class.ilContainerSortingSettings.php';
 
 1338                    include_once 
'./Services/Container/classes/class.ilContainer.php';
 
 1341                        $this->ctrl->setParameter($this, 
'switch_mode', self::VIEW_MODE_SORT);
 
 1343                            'id_content_ordering',
 
 1344                            $this->lng->txt(
'cntr_ordering'),
 
 1345                            $this->ctrl->getLinkTarget($this, 
'switchViewMode')
 
 1349                    $ilCtrl->clearParameters($this);
 
 1350                    $ilTabs->activateSubTab($a_active_subtab);
 
 1354        $ilTabs->activateTab(
'id_content');
 
 1366        $ilTabs = 
$DIC[
'ilTabs'];
 
 1368        $ilHelp = 
$DIC[
'ilHelp'];
 
 1370        $ilHelp->setScreenIdComponent(
"webr");
 
 1375                $lng->txt(
"content"),
 
 1376                $this->ctrl->getLinkTarget($this, 
"view")
 
 1386                $lng->txt(
"info_short"),
 
 1387                $this->ctrl->getLinkTarget($this, 
"infoScreen")
 
 1392            include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1396                    $lng->txt(
"settings"),
 
 1397                    $this->ctrl->getLinkTarget($this, 
"settings")
 
 1405                $lng->txt(
"history"),
 
 1406                $this->ctrl->getLinkTarget($this, 
"history")
 
 1414                $lng->txt(
"link_check"),
 
 1415                $this->ctrl->getLinkTarget($this, 
"linkChecker")
 
 1420            include_once 
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
 
 1422            $mdtab = $mdgui->getTab();
 
 1426                    $lng->txt(
"meta_data"),
 
 1435                $this->lng->txt(
'export'),
 
 1436                $this->ctrl->getLinkTargetByClass(
'ilexportgui', 
'')
 
 1451        $this->tpl->setLocator();
 
 1454        if ($this->message) {
 
 1467        $ilLocator = 
$DIC[
'ilLocator'];
 
 1469        if (is_object($this->
object)) {
 
 1470            $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this), 
"", $this->object->getRefId(), 
"webr");
 
 1477        include_once 
"Services/Form/classes/class.ilFormPropertyGUI.php";
 
 1478        include_once 
"Services/Form/classes/class.ilLinkInputGUI.php";
 
 1481            include_once(
"./Services/Link/classes/class.ilLink.php");
 
 1484            $parts = explode(
"|", $a_target);
 
 1486            if ($parts[0] == 
'wpage') {
 
 1491                    '&target=wiki_wpage_' . $parts[1]
 
 1495            if ($parts[0] == 
"term") {
 
 1501                    "&target=git_" . $parts[1]
 
 1505            if ($parts[0] == 
"page") {
 
 1517        $obj_id = $this->
object->getId();
 
 1519        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1522            if (
$url[
"target"]) {
 
 1525                include_once 
'./Modules/WebResource/classes/class.ilParameterAppender.php';
 
 1537        if ($_REQUEST[
"link_id"]) {
 
 1538            $obj_id = $this->
object->getId();
 
 1540            include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1542            $item = $items->getItem($_REQUEST[
"link_id"]);
 
 1543            if ($item[
"target"]) {
 
 1546                include_once 
'./Modules/WebResource/classes/class.ilParameterAppender.php';
 
 1563            require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
 
 1581        $tpl = 
new ilTemplate(
"tpl.export_html.html", 
true, 
true, 
"Modules/WebResource");
 
 1583        include_once 
'./Modules/WebResource/classes/class.ilLinkResourceItems.php';
 
 1585        foreach ($items->getAllItems() as $item) {
 
 1586            if (!$item[
"active"]) {
 
 1592            $tpl->setCurrentBlock(
"link_bl");
 
 1594            $tpl->setVariable(
"LINK_TITLE", $item[
"title"]);
 
 1595            $tpl->setVariable(
"LINK_DESC", $item[
"description"]);
 
 1596            $tpl->setVariable(
"LINK_CREATE", $item[
"create_date"]);
 
 1597            $tpl->setVariable(
"LINK_UPDATE", $item[
"last_update"]);
 
 1598            $tpl->parseCurrentBlock();
 
 1601        $tpl->setVariable(
"CREATE_DATE", $this->object->getCreateDate());
 
 1602        $tpl->setVariable(
"LAST_UPDATE", $this->object->getLastUpdateDate());
 
 1603        $tpl->setVariable(
"TXT_TITLE", $this->object->getTitle());
 
 1604        $tpl->setVariable(
"TXT_DESC", $this->object->getLongDescription());
 
 1606        $tpl->setVariable(
"INST_ID", (
$ilSetting->get(
'short_inst_name') != 
"")
 
 1613    public static function _goto($a_target, $a_additional = 
null)
 
 1617        $ilAccess = 
$DIC[
'ilAccess'];
 
 1621        if ($a_additional && substr($a_additional, -3) == 
"wsp") {
 
 1622            $_GET[
"baseClass"] = 
"ilsharedresourceGUI";
 
 1623            $_GET[
"wsp_id"] = $a_target;
 
 1624            include(
"ilias.php");
 
 1629        if ($ilAccess->checkAccess(
"read", 
"", $a_target)) {
 
 1630            ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=$a_target");
 
 1633            if ($ilAccess->checkAccess(
"visible", 
"", $a_target)) {
 
 1634                ilUtil::redirect(
"ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target . 
"&cmd=infoScreen");
 
 1636                if ($ilAccess->checkAccess(
"read", 
"", ROOT_FOLDER_ID)) {
 
 1638                        $lng->txt(
"msg_no_perm_read_item"),
 
An exception for terminatinating execution or to throw for unit testing.
const LINKS_ERR_NO_NAME_VALUE
User interface class for advanced drop-down selection lists.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
static _lookupSortMode($a_obj_id)
lookup sort mode
static _getInstance($a_obj_id)
get instance by obj_id
Export User Interface Class.
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24....
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
class for checking external links in page objects.
static _getNotifyStatus($a_usr_id, $a_obj_id)
class ilLinkCheckerTableGUI
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
Class ilObjLinkResourceGUI.
static lookupItem($a_webr_id, $a_link_id)
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one.
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static getLogger($a_component_id)
Get component logger.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
This class represents a non editable value in a property form.
Class ilObjLinkResourceGUI.
confirmDeleteLink()
Show delete confirmation screen.
addLocatorItems()
Functions to be overwritten.
deleteParameter()
Delete a dynamic parameter.
redirectToLink($a_ref_id, $a_obj_id, $a_url)
showLinks()
Show all active links.
infoScreen()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
formatInvalidLinkArray(array $row)
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
switchViewMode()
Switch between "View" "Manage" and "Sort".
showToolbar($a_tpl_var)
Show toolbar.
saveSorting()
Save nmanual sorting.
initCreateForm($a_new_type)
Init object creation form.
initFormLink($a_mode)
Show create/edit single link.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
updateLinks()
Update all visible links.
setTabs()
get tabs @access public
saveAddLink()
Save form data.
saveSettings()
Save container settings.
editLink()
Edit a single link.
getType()
Functions that must be overwritten.
handleSubItemLinks($a_target)
linkChecker()
Show link validation.
settings()
Edit settings Title, Description, Sorting.
editLinks()
Start with manage mode.
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
executeCommand()
execute command
static _goto($a_target, $a_additional=null)
deactivateLink()
Deactivate links.
addLink()
Add an additional link.
deleteLinks()
Delete links.
setValuesFromLink($a_link_id)
Set form values from link.
save()
Save new object @access public.
updateLink()
Save after editing.
infoScreenForward()
show information screen
initFormSettings()
Show settings form.
New implementation of ilObjectGUI.
prepareOutput($a_show_subobjects=true)
prepare output
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
getCreationMode()
get creation mode
GUI class for the workflow of copying objects.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
addHeaderAction()
Add header action menu.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getId()
get object id @access public
Class ilParameterAppender.
static parameterToInfo($a_name, $a_value)
Get info text describing an existing dynamic link.
static _append($a_link_data)
static _getOptionSelect()
Get options as array.
static _getParams($a_link_id)
Get dynamic parameter definitions.
static _isEnabled()
Check if dynamic parameters are enabled.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
special template class to simplify handling of ITX/PEAR
This class represents a text area property in a property form.
This class represents a text property in a property form.
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static infoPanel($a_keep=true)
TableGUI class for search results.
TableGUI class for search results.
if(!array_key_exists('StateId', $_REQUEST)) $id
interface ilLinkCheckerGUIRowHandling
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(empty($password)) $table
if(isset($_POST['submit'])) $form