ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjLinkResourceGUI Class Reference

Class ilObjLinkResourceGUI. More...

+ Inheritance diagram for ilObjLinkResourceGUI:
+ Collaboration diagram for ilObjLinkResourceGUI:

Public Member Functions

 getType ()
 
 executeCommand ()
 
 save ()
 Save new object public. More...
 
 editLink ()
 Edit a single link. More...
 
 updateLink ()
 Save after editing. More...
 
 addLink ()
 Add an additional link. More...
 
 saveAddLink ()
 Save form data. More...
 
 view ()
 View object. More...
 
 infoScreen ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreenForward ()
 show information screen More...
 
 history ()
 
 formatInvalidLinkArray (array $row)
 
 saveLinkCheck ()
 
 refreshLinkCheck ()
 
 __initLinkChecker ()
 
 setTabs ()
 get tabs public More...
 
 __prepareOutput ()
 
 addLocatorItems ()
 
 callDirectLink ()
 
 callLink ()
 
 exportHTML ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _goto ($a_target, $a_additional=null)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Data Fields

const VIEW_MODE_VIEW = 1
 
const VIEW_MODE_MANAGE = 2
 
const VIEW_MODE_SORT = 3
 
const LINK_MOD_CREATE = 1
 
const LINK_MOD_EDIT = 2
 
const LINK_MOD_ADD = 3
 
- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Protected Member Functions

 initCreateForm ($a_new_type)
 
 afterSave (ilObject $a_new_object)
 
 settings ()
 Edit settings Title, Description, Sorting. More...
 
 saveSettings ()
 Save container settings. More...
 
 initFormSettings ()
 Show settings form. More...
 
 deleteParameter ()
 Delete a dynamic parameter. More...
 
 deleteParameterForm ()
 
 updateLinks ()
 Update all visible links. More...
 
 setValuesFromLink ($a_link_id)
 Set form values from link. More...
 
 checkLinkInput ($a_mode, $a_webr_id=0, $a_link_id=0)
 Check input after creating a new link. More...
 
 initFormLink ($a_mode)
 Show create/edit single link. More...
 
 isContainerMetaDataRequired ()
 Check if a new container title is required Necessary if there is more than one link. More...
 
 switchViewMode ()
 Switch between "View" "Manage" and "Sort". More...
 
 editLinks ()
 Start with manage mode. More...
 
 manage ()
 Manage links. More...
 
 showLinks ()
 Show all active links. More...
 
 sort ()
 Sort web links. More...
 
 saveSorting ()
 Save nmanual sorting. More...
 
 showToolbar ($a_tpl_var)
 Show toolbar. More...
 
 confirmDeleteLink ()
 Show delete confirmation screen. More...
 
 deleteLinks ()
 Delete links. More...
 
 deactivateLink ()
 Deactivate links. More...
 
 linkChecker ()
 Show link validation. More...
 
 activateTabs ($a_active_tab, $a_active_subtab='')
 Activate tab and subtabs. More...
 
 handleSubItemLinks ($a_target)
 
 redirectToLink ($a_ref_id, $a_obj_id, $a_url)
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Member Function Documentation

◆ __initLinkChecker()

ilObjLinkResourceGUI::__initLinkChecker ( )

Definition at line 1290 of file class.ilObjLinkResourceGUI.php.

References $DIC, and $ilDB.

Referenced by linkChecker(), and refreshLinkCheck().

1291  {
1292  global $DIC;
1293 
1294  $ilDB = $DIC['ilDB'];
1295 
1296  include_once './Services/LinkChecker/classes/class.ilLinkChecker.php';
1297 
1298  $this->link_checker_obj = new ilLinkChecker($ilDB, false);
1299  $this->link_checker_obj->setObjId($this->object->getId());
1300 
1301  return true;
1302  }
global $DIC
Definition: saml.php:7
class for checking external links in page objects Normally used in Cron jobs, but should be extensibl...
global $ilDB
+ Here is the caller graph for this function:

◆ __prepareOutput()

ilObjLinkResourceGUI::__prepareOutput ( )

Definition at line 1445 of file class.ilObjLinkResourceGUI.php.

References ilUtil\infoPanel(), and ilUtil\sendInfo().

Referenced by executeCommand().

1446  {
1447  // output objects
1448  // $this->tpl->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
1449  // $this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
1450 
1451  $this->tpl->setLocator();
1452 
1453  // output message
1454  if ($this->message) {
1455  ilUtil::sendInfo($this->message);
1456  }
1457 
1458  // display infopanel if something happened
1460  ;
1461  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static infoPanel($a_keep=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _goto()

static ilObjLinkResourceGUI::_goto (   $a_target,
  $a_additional = null 
)
static

Definition at line 1613 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilUtil\redirect(), and ilUtil\sendFailure().

1614  {
1615  global $DIC;
1616 
1617  $ilAccess = $DIC['ilAccess'];
1618  $ilErr = $DIC['ilErr'];
1619  $lng = $DIC['lng'];
1620 
1621  if ($a_additional && substr($a_additional, -3) == "wsp") {
1622  $_GET["baseClass"] = "ilsharedresourceGUI";
1623  $_GET["wsp_id"] = $a_target;
1624  include("ilias.php");
1625  exit;
1626  }
1627 
1628  // Will be replaced in future releases by ilAccess::checkAccess()
1629  if ($ilAccess->checkAccess("read", "", $a_target)) {
1630  ilUtil::redirect("ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=$a_target");
1631  } else {
1632  // to do: force flat view
1633  if ($ilAccess->checkAccess("visible", "", $a_target)) {
1634  ilUtil::redirect("ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target . "&cmd=infoScreen");
1635  } else {
1636  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1637  ilUtil::sendFailure(sprintf(
1638  $lng->txt("msg_no_perm_read_item"),
1640  ), true);
1642  }
1643  }
1644  }
1645 
1646  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1647  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: backend.php:16
static redirect($a_script)
+ Here is the call graph for this function:

◆ activateTabs()

ilObjLinkResourceGUI::activateTabs (   $a_active_tab,
  $a_active_subtab = '' 
)
protected

Activate tab and subtabs.

Parameters
string$a_active_tab
string$a_active_subtab[optional]
Returns

Definition at line 1311 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilContainerSortingSettings\_lookupSortMode(), ilObject2GUI\checkPermissionBool(), ilLinkResourceItems\lookupNumberOfLinks(), and ilContainer\SORT_MANUAL.

Referenced by addLink(), confirmDeleteLink(), editLink(), manage(), saveAddLink(), showLinks(), sort(), and updateLinks().

1312  {
1313  global $DIC;
1314 
1315  $ilCtrl = $DIC['ilCtrl'];
1316  $ilTabs = $DIC['ilTabs'];
1317  $lng = $DIC['lng'];
1318 
1319  switch ($a_active_tab) {
1320  case 'content':
1321  if ($this->checkPermissionBool('write')) {
1322  $this->lng->loadLanguageModule('cntr');
1323 
1324  $this->ctrl->setParameter($this, 'switch_mode', self::VIEW_MODE_VIEW);
1325  $ilTabs->addSubTab(
1326  'id_content_view',
1327  $lng->txt('view'),
1328  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1329  );
1330  $this->ctrl->setParameter($this, 'switch_mode', self::VIEW_MODE_MANAGE);
1331  $ilTabs->addSubTab(
1332  'id_content_manage',
1333  $lng->txt('cntr_manage'),
1334  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1335  );
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';
1339  if ((ilLinkResourceItems::lookupNumberOfLinks($this->object->getId()) > 1)
1341  $this->ctrl->setParameter($this, 'switch_mode', self::VIEW_MODE_SORT);
1342  $ilTabs->addSubTab(
1343  'id_content_ordering',
1344  $this->lng->txt('cntr_ordering'),
1345  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1346  );
1347  }
1348 
1349  $ilCtrl->clearParameters($this);
1350  $ilTabs->activateSubTab($a_active_subtab);
1351  }
1352  }
1353 
1354  $ilTabs->activateTab('id_content');
1355  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
global $ilCtrl
Definition: ilias.php:18
static _lookupSortMode($a_obj_id)
lookup sort mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLink()

ilObjLinkResourceGUI::addLink ( )

Add an additional link.

Returns

Definition at line 367 of file class.ilObjLinkResourceGUI.php.

References activateTabs(), ilObject2GUI\checkPermission(), and initFormLink().

368  {
369  $this->checkPermission('write');
370  $this->activateTabs('content', 'id_content_view');
371 
372  $this->initFormLink(self::LINK_MOD_ADD);
373  $this->tpl->setContent($this->form->getHTML());
374  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
initFormLink($a_mode)
Show create/edit single link.
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjLinkResourceGUI::addLocatorItems ( )

Definition at line 1463 of file class.ilObjLinkResourceGUI.php.

References $DIC.

1464  {
1465  global $DIC;
1466 
1467  $ilLocator = $DIC['ilLocator'];
1468 
1469  if (is_object($this->object)) {
1470  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this), "", $this->object->getRefId(), "webr");
1471  }
1472  }
global $DIC
Definition: saml.php:7

◆ afterSave()

ilObjLinkResourceGUI::afterSave ( ilObject  $a_new_object)
protected

Definition at line 169 of file class.ilObjLinkResourceGUI.php.

References ilObject\getId(), ilObject\getRefId(), and ilUtil\redirect().

170  {
171  // Save link
172  $this->link->setLinkResourceId($a_new_object->getId());
173  $link_id = $this->link->add();
174  $this->link->updateValid(true);
175 
176  ilUtil::sendSuccess($this->lng->txt('webr_link_added'));
177 
178  // personal workspace
179  if ($this->id_type == self::WORKSPACE_NODE_ID) {
180  $this->ctrl->redirect($this, "editLinks");
181  }
182  // repository
183  else {
184  ilUtil::redirect("ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" .
185  $a_new_object->getRefId() . "&cmd=switchViewMode&switch_mode=2");
186  }
187  }
getId()
get object id public
getRefId()
get reference id public
static redirect($a_script)
+ Here is the call graph for this function:

◆ callDirectLink()

ilObjLinkResourceGUI::callDirectLink ( )

Definition at line 1515 of file class.ilObjLinkResourceGUI.php.

References ilObjectGUI\$obj_id, $url, ilParameterAppender\_append(), ilLinkResourceItems\_getFirstLink(), ilParameterAppender\_isEnabled(), ilLinkResourceItems\_isSingular(), handleSubItemLinks(), and redirectToLink().

1516  {
1517  $obj_id = $this->object->getId();
1518 
1519  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1522  if ($url["target"]) {
1523  $url["target"] = $this->handleSubItemLinks($url["target"]);
1524 
1525  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
1528  }
1529 
1530  $this->redirectToLink($this->ref_id, $obj_id, $url["target"]);
1531  }
1532  }
1533  }
static _isSingular($a_webr_id)
Check whether there is only one active link in the web resource.
static _append($a_link_data)
static _getFirstLink($a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
$url
redirectToLink($a_ref_id, $a_obj_id, $a_url)
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:

◆ callLink()

ilObjLinkResourceGUI::callLink ( )

Definition at line 1535 of file class.ilObjLinkResourceGUI.php.

References ilObjectGUI\$obj_id, ilParameterAppender\_append(), ilParameterAppender\_isEnabled(), ilLoggerFactory\getLogger(), handleSubItemLinks(), and redirectToLink().

1536  {
1537  if ($_REQUEST["link_id"]) {
1538  $obj_id = $this->object->getId();
1539 
1540  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1541  $items = new ilLinkResourceItems($obj_id);
1542  $item = $items->getItem($_REQUEST["link_id"]);
1543  if ($item["target"]) {
1544  $item["target"] = $this->handleSubItemLinks($item["target"]);
1545 
1546  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
1548  $item = ilParameterAppender::_append($item);
1549  }
1550  ilLoggerFactory::getLogger('webr')->debug('Redirecting to: ' . $item['target']);
1551  $this->redirectToLink($this->ref_id, $obj_id, $item["target"]);
1552  }
1553  }
1554  }
static _append($a_link_data)
Class ilObjLinkResourceGUI.
static getLogger($a_component_id)
Get component logger.
redirectToLink($a_ref_id, $a_obj_id, $a_url)
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:

◆ checkLinkInput()

ilObjLinkResourceGUI::checkLinkInput (   $a_mode,
  $a_webr_id = 0,
  $a_link_id = 0 
)
protected

Check input after creating a new link.

Parameters
object$a_mode
object$a_webr_id[optional]
object$a_link_id[optional]
Returns

Definition at line 605 of file class.ilObjLinkResourceGUI.php.

References $valid, ilParameterAppender\_isEnabled(), ilLinkInputGUI\isInternalLink(), LINKS_ERR_NO_NAME, LINKS_ERR_NO_NAME_VALUE, LINKS_ERR_NO_VALUE, and ilUtil\stripSlashes().

Referenced by save(), saveAddLink(), and updateLink().

606  {
607  $valid = $this->form->checkInput();
608 
609  $link_input = $this->form->getInput('tar');
610 
611  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
612  $this->link = new ilLinkResourceItems($a_webr_id);
613  $this->link->setTarget(str_replace('"', '', ilUtil::stripSlashes($link_input)));
614  $this->link->setTitle($this->form->getInput('tit'));
615  $this->link->setDescription($this->form->getInput('des'));
616  $this->link->setDisableCheckStatus($this->form->getInput('che'));
617  $this->link->setInternal(ilLinkInputGUI::isInternalLink($link_input));
618 
619  if ($a_mode == self::LINK_MOD_CREATE) {
620  $this->link->setActiveStatus(true);
621  } else {
622  $this->link->setActiveStatus($this->form->getInput('act'));
623  }
624 
625  if ($a_mode == self::LINK_MOD_EDIT) {
626  $this->link->setValidStatus($this->form->getInput('vali'));
627  } else {
628  $this->link->setValidStatus(true);
629  }
630 
632  return $valid;
633  }
634 
635  $this->dynamic = new ilParameterAppender($a_webr_id);
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()) {
640  case LINKS_ERR_NO_NAME:
641  $this->form->getItemByPostVar('nam')->setAlert($this->lng->txt('links_no_name_given'));
642  return false;
643 
644  case LINKS_ERR_NO_VALUE:
645  $this->form->getItemByPostVar('val')->setAlert($this->lng->txt('links_no_value_given'));
646  return false;
647 
649  // Nothing entered => no error
650  return $valid;
651  }
652  $this->dynamic = null;
653  }
654  return $valid;
655  }
$valid
static isInternalLink($a_value)
const LINKS_ERR_NO_VALUE
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
const LINKS_ERR_NO_NAME
Class ilObjLinkResourceGUI.
Class ilParameterAppender.
const LINKS_ERR_NO_NAME_VALUE
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteLink()

ilObjLinkResourceGUI::confirmDeleteLink ( )
protected

Show delete confirmation screen.

Returns

Definition at line 1020 of file class.ilObjLinkResourceGUI.php.

References $_GET, $_POST, $links, activateTabs(), ilObject2GUI\checkPermission(), ilUtil\sendFailure(), and view().

1021  {
1022  $this->checkPermission('write');
1023  $this->activateTabs('content', 'id_content_view');
1024 
1025  $link_ids = array();
1026 
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']);
1031  }
1032 
1033  if (!count($link_ids) > 0) {
1034  ilUtil::sendFailure($this->lng->txt('select_one'));
1035  $this->view();
1036  return false;
1037  }
1038 
1039  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1040  $links = new ilLinkResourceItems($this->object->getId());
1041 
1042  include_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
1043  $confirm = new ilConfirmationGUI();
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');
1048 
1049  foreach ($link_ids as $link_id) {
1050  $link = $links->getItem($link_id);
1051  $confirm->addItem('link_ids[]', $link_id, $link['title']);
1052  }
1053  $this->tpl->setContent($confirm->getHTML());
1054  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
$_GET["client_id"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjLinkResourceGUI.
$links
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ deactivateLink()

ilObjLinkResourceGUI::deactivateLink ( )
protected

Deactivate links.

Returns

Definition at line 1082 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, $links, ilObject2GUI\checkPermission(), and ilUtil\sendFailure().

1083  {
1084  global $DIC;
1085 
1086  $ilCtrl = $DIC['ilCtrl'];
1087 
1088  $this->checkPermission('write');
1089 
1090  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1091  $links = new ilLinkResourceItems($this->object->getId());
1092 
1093  if (!$_GET['link_id']) {
1094  ilUtil::sendFailure($this->lng->txt('select_one'), true);
1095  $ilCtrl->redirect($this, 'view');
1096  }
1097 
1098  $links->setLinkId((int) $_GET['link_id']);
1099  $links->updateActive(false);
1100 
1101  ilUtil::sendSuccess($this->lng->txt('webr_inactive_success'), true);
1102  $ilCtrl->redirect($this, 'view');
1103  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjLinkResourceGUI.
$links
+ Here is the call graph for this function:

◆ deleteLinks()

ilObjLinkResourceGUI::deleteLinks ( )
protected

Delete links.

Returns

Definition at line 1060 of file class.ilObjLinkResourceGUI.php.

References $_POST, $DIC, $ilCtrl, $links, and ilObject2GUI\checkPermission().

1061  {
1062  global $DIC;
1063 
1064  $ilCtrl = $DIC['ilCtrl'];
1065 
1066  $this->checkPermission('write');
1067 
1068  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1069  $links = new ilLinkResourceItems($this->object->getId());
1070 
1071  foreach ($_POST['link_ids'] as $link_id) {
1072  $links->delete($link_id);
1073  }
1074  ilUtil::sendSuccess($this->lng->txt('webr_deleted_items'), true);
1075  $ilCtrl->redirect($this, 'view');
1076  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
Class ilObjLinkResourceGUI.
$links
$_POST["username"]
+ Here is the call graph for this function:

◆ deleteParameter()

ilObjLinkResourceGUI::deleteParameter ( )
protected

Delete a dynamic parameter.

Returns

Definition at line 420 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, ilObject2GUI\checkPermission(), ilParameterAppender\delete(), and ilUtil\sendFailure().

421  {
422  global $DIC;
423 
424  $ilCtrl = $DIC['ilCtrl'];
425 
426  $this->checkPermission('write');
427 
428  $this->ctrl->setParameter($this, 'link_id', (int) $_GET['link_id']);
429 
430  if (!isset($_GET['param_id'])) {
431  ilUtil::sendFailure($this->lng->txt('select_one'), true);
432  $ilCtrl->redirect($this, 'view');
433  }
434 
435  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
436  $param = new ilParameterAppender($this->object->getId());
437  $param->delete((int) $_GET['param_id']);
438 
439  ilUtil::sendSuccess($this->lng->txt('links_parameter_deleted'), true);
440  $ilCtrl->redirect($this, 'editLinks');
441  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilParameterAppender.
+ Here is the call graph for this function:

◆ deleteParameterForm()

ilObjLinkResourceGUI::deleteParameterForm ( )
protected

Definition at line 443 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, ilObject2GUI\checkPermission(), ilParameterAppender\delete(), and ilUtil\sendFailure().

444  {
445  global $DIC;
446 
447  $ilCtrl = $DIC['ilCtrl'];
448 
449  $this->checkPermission('write');
450 
451  if (!isset($_GET['param_id'])) {
452  ilUtil::sendFailure($this->lng->txt('select_one'), true);
453  $ilCtrl->redirect($this, 'view');
454  }
455 
456  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
457  $param = new ilParameterAppender($this->object->getId());
458  $param->delete((int) $_GET['param_id']);
459 
460  ilUtil::sendSuccess($this->lng->txt('links_parameter_deleted'), true);
461  $ilCtrl->redirect($this, 'view');
462  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilParameterAppender.
+ Here is the call graph for this function:

◆ editLink()

ilObjLinkResourceGUI::editLink ( )

Edit a single link.

Returns

Definition at line 312 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, activateTabs(), ilObject2GUI\checkPermission(), initFormLink(), ilUtil\sendFailure(), and setValuesFromLink().

313  {
314  global $DIC;
315 
316  $ilCtrl = $DIC['ilCtrl'];
317 
318  $this->checkPermission('write');
319  $this->activateTabs('content', 'id_content_view');
320 
321  if (!(int) $_GET['link_id']) {
322  ilUtil::sendFailure($this->lng->txt('select_one'), true);
323  $ilCtrl->redirect($this, 'view');
324  }
325 
326  $this->initFormLink(self::LINK_MOD_EDIT);
327  $this->setValuesFromLink((int) $_GET['link_id']);
328  $this->tpl->setContent($this->form->getHTML());
329  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setValuesFromLink($a_link_id)
Set form values from link.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initFormLink($a_mode)
Show create/edit single link.
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
+ Here is the call graph for this function:

◆ editLinks()

ilObjLinkResourceGUI::editLinks ( )
protected

Start with manage mode.

Returns

Definition at line 865 of file class.ilObjLinkResourceGUI.php.

References $_GET, and switchViewMode().

866  {
867  $_GET['switch_mode'] = self::VIEW_MODE_MANAGE;
868  $this->switchViewMode();
869  }
$_GET["client_id"]
switchViewMode()
Switch between "View" "Manage" and "Sort".
+ Here is the call graph for this function:

◆ executeCommand()

ilObjLinkResourceGUI::executeCommand ( )

Definition at line 37 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, ilObjectGUI\$ilErr, $ret, __prepareOutput(), ilMDUtils\_fillHTMLMetaTags(), ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermission(), ilObject2GUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreenForward(), initFormLink(), and ilObject2GUI\prepareOutput().

38  {
39  global $DIC;
40 
41  $ilCtrl = $DIC['ilCtrl'];
42  $ilTabs = $DIC['ilTabs'];
43  $ilErr = $DIC['ilErr'];
44  $ilAccess = $DIC['ilAccess'];
45 
46 
47  //if($this->ctrl->getTargetScript() == 'link_resources.php')
48  if ($_GET["baseClass"] == 'ilLinkResourceHandlerGUI') {
49  $_GET['view_mode'] = isset($_GET['switch_mode']) ? $_GET['switch_mode'] : $_GET['view_mode'];
50  $ilCtrl->saveParameter($this, 'view_mode');
51  $this->__prepareOutput();
52  }
53 
54  $this->lng->loadLanguageModule("webr");
55 
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58 
59  switch ($next_class) {
60  case "ilinfoscreengui":
61  $this->prepareOutput();
62  $this->infoScreenForward(); // forwards command
63  break;
64 
65  case 'ilobjectmetadatagui':
66  $this->checkPermission('write'); // #18563
67  $this->prepareOutput();
68  $ilTabs->activateTab('id_meta_data');
69  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
70  $md_gui = new ilObjectMetaDataGUI($this->object);
71  $this->ctrl->forwardCommand($md_gui);
72  break;
73 
74  case 'ilpermissiongui':
75  $this->prepareOutput();
76  $ilTabs->activateTab('id_permissions');
77  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
78  $perm_gui = new ilPermissionGUI($this);
79  $ret = &$this->ctrl->forwardCommand($perm_gui);
80  break;
81 
82  case 'ilobjectcopygui':
83  $this->prepareOutput();
84  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
85  $cp = new ilObjectCopyGUI($this);
86  $cp->setType('webr');
87  $this->ctrl->forwardCommand($cp);
88  break;
89 
90  case 'ilexportgui':
91  $this->prepareOutput();
92  $this->tabs_gui->setTabActive('export');
93  include_once './Services/Export/classes/class.ilExportGUI.php';
94  $exp = new ilExportGUI($this);
95  $exp->addFormat('xml');
96  $this->ctrl->forwardCommand($exp);
97  break;
98 
99  case "ilcommonactiondispatchergui":
100  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
102  $this->ctrl->forwardCommand($gui);
103  break;
104 
105  case "ilpropertyformgui":
106  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
107  $this->initFormLink(self::LINK_MOD_EDIT);
108  $this->ctrl->forwardCommand($this->form);
109  break;
110 
111  case "ilinternallinkgui":
112  $this->lng->loadLanguageModule("content");
113  require_once("./Services/Link/classes/class.ilInternalLinkGUI.php");
114  $link_gui = new ilInternalLinkGUI("RepositoryItem", 0);
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);
120  break;
121 
122  default:
123  if (!$cmd) {
124  $this->ctrl->setCmd("view");
125  }
126  parent::executeCommand();
127  }
128 
129  if (!$this->getCreationMode()) {
130  // Fill meta header tags
131  include_once('Services/MetaData/classes/class.ilMDUtils.php');
132  ilMDUtils::_fillHTMLMetaTags($this->object->getId(), $this->object->getId(), 'webr');
133 
134  $this->addHeaderAction();
135  }
136  return true;
137  }
Class ilObjectMetaDataGUI.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
GUI class for the workflow of copying objects.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
Class ilInternalLinkGUI.
infoScreenForward()
show information screen
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
$ret
Definition: parser.php:6
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
initFormLink($a_mode)
Show create/edit single link.
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ exportHTML()

ilObjLinkResourceGUI::exportHTML ( )

Definition at line 1575 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilSetting, $target, ilObjectGUI\$tpl, ilUtil\deliverData(), and handleSubItemLinks().

1576  {
1577  global $DIC;
1578 
1579  $ilSetting = $DIC['ilSetting'];
1580 
1581  $tpl = new ilTemplate("tpl.export_html.html", true, true, "Modules/WebResource");
1582 
1583  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1584  $items = new ilLinkResourceItems($this->object->getId());
1585  foreach ($items->getAllItems() as $item) {
1586  if (!$item["active"]) {
1587  continue;
1588  }
1589 
1590  $target = $this->handleSubItemLinks($item["target"]);
1591 
1592  $tpl->setCurrentBlock("link_bl");
1593  $tpl->setVariable("LINK_URL", $target);
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();
1599  }
1600 
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());
1605 
1606  $tpl->setVariable("INST_ID", ($ilSetting->get('short_inst_name') != "")
1607  ? $ilSetting->get('short_inst_name')
1608  : "ILIAS");
1609 
1610  ilUtil::deliverData($tpl->get(), "bookmarks.html");
1611  }
static deliverData($a_data, $a_filename, $mime="application/octet-stream", $charset="")
deliver data for download via browser.
global $DIC
Definition: saml.php:7
special template class to simplify handling of ITX/PEAR
global $ilSetting
Definition: privfeed.php:17
Class ilObjLinkResourceGUI.
$target
Definition: test.php:19
+ Here is the call graph for this function:

◆ formatInvalidLinkArray()

ilObjLinkResourceGUI::formatInvalidLinkArray ( array  $row)
See also
ilLinkCheckerGUIRowHandling::formatInvalidLinkArray()
Parameters
arrayUnformatted array
Returns
array Formatted array public

Implements ilLinkCheckerGUIRowHandling.

Definition at line 1172 of file class.ilObjLinkResourceGUI.php.

References ilObjectGUI\$actions, and $row.

1173  {
1174  $this->object->items_obj->readItem($row['page_id']);
1175  $row['title'] = $this->object->items_obj->getTitle();
1176 
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'));
1182  $actions->setId($row['page_id']);
1183  $this->ctrl->setParameter($this, 'link_id', $row['page_id']);
1184  $actions->addItem(
1185  $this->lng->txt('edit'),
1186  '',
1187  $this->ctrl->getLinkTarget($this, 'editLink')
1188  );
1189  $this->ctrl->clearParameters($this);
1190  $row['action_html'] = $actions->getHTML();
1191 
1192  return $row;
1193  }
$row
User interface class for advanced drop-down selection lists.

◆ getType()

ilObjLinkResourceGUI::getType ( )

Definition at line 32 of file class.ilObjLinkResourceGUI.php.

33  {
34  return "webr";
35  }

◆ handleSubItemLinks()

ilObjLinkResourceGUI::handleSubItemLinks (   $a_target)
protected

Definition at line 1474 of file class.ilObjLinkResourceGUI.php.

References ilLink\_getStaticLink(), and ilLinkInputGUI\isInternalLink().

Referenced by callDirectLink(), callLink(), and exportHTML().

1475  {
1476  // #15647 - handle internal links
1477  include_once "Services/Form/classes/class.ilFormPropertyGUI.php";
1478  include_once "Services/Form/classes/class.ilLinkInputGUI.php";
1479 
1480  if (ilLinkInputGUI::isInternalLink($a_target)) {
1481  include_once("./Services/Link/classes/class.ilLink.php");
1482 
1483  // #10612
1484  $parts = explode("|", $a_target);
1485 
1486  if ($parts[0] == 'wpage') {
1487  return ilLink::_getStaticLink(
1488  0,
1489  'wiki',
1490  true,
1491  '&target=wiki_wpage_' . $parts[1]
1492  );
1493  }
1494 
1495  if ($parts[0] == "term") {
1496  // #16894
1497  return ilLink::_getStaticLink(
1498  0,
1499  "git",
1500  true,
1501  "&target=git_" . $parts[1]
1502  );
1503  }
1504 
1505  if ($parts[0] == "page") {
1506  $parts[0] = "pg";
1507  }
1508 
1509  $a_target = ilLink::_getStaticLink($parts[1], $parts[0]);
1510  }
1511 
1512  return $a_target;
1513  }
static isInternalLink($a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ history()

ilObjLinkResourceGUI::history ( )

Definition at line 1149 of file class.ilObjLinkResourceGUI.php.

References $DIC, ilObject2GUI\checkPermission(), and ilHistoryTableGUI\initTable().

1150  {
1151  global $DIC;
1152 
1153  $ilTabs = $DIC['ilTabs'];
1154 
1155  $this->checkPermission('write');
1156  $ilTabs->activateTab('id_history');
1157 
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());
1162  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24.10.14 Time: 10:35.
+ Here is the call graph for this function:

◆ infoScreen()

ilObjLinkResourceGUI::infoScreen ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 1111 of file class.ilObjLinkResourceGUI.php.

References infoScreenForward().

1112  {
1113  $this->ctrl->setCmd("showSummary");
1114  $this->ctrl->setCmdClass("ilinfoscreengui");
1115  $this->infoScreenForward();
1116  }
infoScreenForward()
show information screen
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjLinkResourceGUI::infoScreenForward ( )

show information screen

Definition at line 1121 of file class.ilObjLinkResourceGUI.php.

References $DIC, $info, ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), and ilObject2GUI\getPermanentLinkWidget().

Referenced by executeCommand(), and infoScreen().

1122  {
1123  global $DIC;
1124 
1125  $ilTabs = $DIC['ilTabs'];
1126 
1127  if (!$this->checkPermissionBool('visible')) {
1128  $this->checkPermission('read');
1129  }
1130  $ilTabs->activateTab('id_info');
1131 
1132  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1133  $info = new ilInfoScreenGUI($this);
1134 
1135  $info->enablePrivateNotes();
1136 
1137  // standard meta data
1138  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1139 
1140  if ($this->id_type == self::WORKSPACE_NODE_ID) {
1141  $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
1142  }
1143 
1144  // forward the command
1145  $this->ctrl->forwardCommand($info);
1146  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Class ilInfoScreenGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
getPermanentLinkWidget($a_append=null, $a_center=false)
$info
Definition: index.php:5
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjLinkResourceGUI::initCreateForm (   $a_new_type)
protected

Definition at line 139 of file class.ilObjLinkResourceGUI.php.

References $form, and initFormLink().

140  {
141  $this->initFormLink(self::LINK_MOD_CREATE);
142  return $this->form;
143  }
if(isset($_POST['submit'])) $form
initFormLink($a_mode)
Show create/edit single link.
+ Here is the call graph for this function:

◆ initFormLink()

ilObjLinkResourceGUI::initFormLink (   $a_mode)
protected

Show create/edit single link.

Parameters
intform mode
Returns

Definition at line 663 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $id, $links, $title, ilParameterAppender\_getOptionSelect(), ilParameterAppender\_getParams(), ilParameterAppender\_isEnabled(), ilSubEnabledFormPropertyGUI\addSubItem(), isContainerMetaDataRequired(), ilParameterAppender\parameterToInfo(), ilUtil\sendInfo(), ilCheckboxInputGUI\setChecked(), ilNonEditableValueGUI\setInfo(), ilLinkInputGUI\setInternalLinkFilterTypes(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilTextAreaInputGUI\setRows(), ilTextInputGUI\setSize(), and ilCheckboxInputGUI\setValue().

Referenced by addLink(), editLink(), executeCommand(), initCreateForm(), save(), saveAddLink(), and updateLink().

664  {
665  global $DIC;
666 
667  $ilTabs = $DIC['ilTabs'];
668 
669  $ilTabs->activateTab("id_content");
670 
671  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
672  $this->form = new ilPropertyFormGUI();
673 
674  switch ($a_mode) {
675  case self::LINK_MOD_CREATE:
676  // Header
677  $this->ctrl->setParameter($this, 'new_type', 'webr');
678  $this->form->setTitle($this->lng->txt('webr_new_link'));
679  $this->form->setTableWidth('600px');
680 
681  // Buttons
682  $this->form->addCommandButton('save', $this->lng->txt('webr_add'));
683  $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
684  break;
685 
686  case self::LINK_MOD_ADD:
687  // Header
688  $this->form->setTitle($this->lng->txt('webr_new_link'));
689 
690  // Buttons
691  $this->form->addCommandButton('saveAddLink', $this->lng->txt('webr_add'));
692  $this->form->addCommandButton('view', $this->lng->txt('cancel'));
693  break;
694 
695  case self::LINK_MOD_EDIT:
696  // Header
697  $this->ctrl->setParameter($this, 'link_id', (int) $_REQUEST['link_id']);
698  $this->form->setTitle($this->lng->txt('webr_edit'));
699 
700  // Buttons
701  $this->form->addCommandButton('updateLink', $this->lng->txt('save'));
702  $this->form->addCommandButton('view', $this->lng->txt('cancel'));
703  break;
704  }
705 
706 
707  $this->form->setFormAction($this->ctrl->getFormAction($this));
708 
709  if ($a_mode == self::LINK_MOD_ADD and $this->isContainerMetaDataRequired()) {
710  ilUtil::sendInfo($this->lng->txt('webr_container_info'));
711 
712 
713  $this->form->setTitle($this->lng->txt('webr_edit_list'));
714 
715  // List Title
716  $title = new ilTextInputGUI($this->lng->txt('webr_list_title'), 'lti');
717  $title->setRequired(true);
718  $title->setSize(40);
719  $title->setMaxLength(127);
720  $this->form->addItem($title);
721 
722  // List Description
723  $desc = new ilTextAreaInputGUI($this->lng->txt('webr_list_desc'), 'tde');
724  $desc->setRows(3);
725  $desc->setCols(40);
726  $this->form->addItem($desc);
727 
728  // Addtional section
729  $sect = new ilFormSectionHeaderGUI();
730  $sect->setTitle($this->lng->txt('webr_add'));
731  $this->form->addItem($sect);
732  }
733 
734  // Target
735  /*
736  $tar = new ilTextInputGUI($this->lng->txt('webr_link_target'),'tar');
737  $tar->setValue("http://");
738 
739  $tar->setSize(40);
740  $tar->setMaxLength(500);
741  */
742  include_once 'Services/Form/classes/class.ilLinkInputGUI.php';
743  $tar = new ilLinkInputGUI($this->lng->txt('webr_link_target'), 'tar');
745  array(
746  "PageObject",
747  "GlossaryItem",
748  "RepositoryItem",
749  'WikiPage'
750  )
751  );
752  $tar->setExternalLinkMaxLength(1000);
753  $tar->setInternalLinkFilterTypes(array("PageObject", "GlossaryItem", "RepositoryItem"));
754  $tar->setRequired(true);
755  $this->form->addItem($tar);
756 
757  // Title
758  $tit = new ilTextInputGUI($this->lng->txt('webr_link_title'), 'tit');
759  $tit->setRequired(true);
760  $tit->setSize(40);
761  $tit->setMaxLength(127);
762  $this->form->addItem($tit);
763 
764  // Description
765  $des = new ilTextAreaInputGUI($this->lng->txt('description'), 'des');
766  $des->setRows(3);
767  $des->setCols(40);
768  $this->form->addItem($des);
769 
770 
771  if ($a_mode != self::LINK_MOD_CREATE) {
772  // Active
773  $act = new ilCheckboxInputGUI($this->lng->txt('active'), 'act');
774  $act->setChecked(true);
775  $act->setValue(1);
776  $this->form->addItem($act);
777 
778  // Check
779  $che = new ilCheckboxInputGUI($this->lng->txt('webr_disable_check'), 'che');
780  $che->setValue(1);
781  $this->form->addItem($che);
782  }
783 
784  // Valid
785  if ($a_mode == self::LINK_MOD_EDIT) {
786  $val = new ilCheckboxInputGUI($this->lng->txt('valid'), 'vali');
787  $this->form->addItem($val);
788  }
789 
790  if (ilParameterAppender::_isEnabled() && $a_mode != self::LINK_MOD_CREATE) {
791  $dyn = new ilNonEditableValueGUI($this->lng->txt('links_dyn_parameter'));
792  $dyn->setInfo($this->lng->txt('links_dynamic_info'));
793 
794 
795  if (count($links = ilParameterAppender::_getParams((int) $_GET['link_id']))) {
796  $ex = new ilCustomInputGUI($this->lng->txt('links_existing_params'), 'ex');
797  $dyn->addSubItem($ex);
798 
799  foreach ($links as $id => $link) {
800  $p = new ilCustomInputGUI();
801 
802  $ptpl = new ilTemplate('tpl.link_dyn_param_edit.html', true, true, 'Modules/WebResource');
803  $ptpl->setVariable('INFO_TXT', ilParameterAppender::parameterToInfo($link['name'], $link['value']));
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);
809  }
810  }
811 
812  // Existing parameters
813 
814  // New parameter
815  if ($a_mode != self::LINK_MOD_CREATE) {
816  #$new = new ilCustomInputGUI($this->lng->txt('links_add_param'),'');
817  #$dyn->addSubItem($new);
818  }
819 
820  // Dynyamic name
821  $nam = new ilTextInputGUI($this->lng->txt('links_name'), 'nam');
822  $nam->setSize(12);
823  $nam->setMaxLength(128);
824  $dyn->addSubItem($nam);
825 
826  // Dynamic value
827  $val = new ilSelectInputGUI($this->lng->txt('links_value'), 'val');
829  $val->setValue(0);
830  $dyn->addSubItem($val);
831 
832  $this->form->addItem($dyn);
833  }
834  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
This class represents a section header in a property form.
static _getOptionSelect()
Get options as array.
setInfo($a_info)
Set Information Text.
if(!array_key_exists('StateId', $_REQUEST)) $id
setInternalLinkFilterTypes(array $a_val)
Set internal link filter types.
This class represents a checkbox property in a property form.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setChecked($a_checked)
Set Checked.
static parameterToInfo($a_name, $a_value)
Get info text describing an existing dynamic link.
setValue($a_value)
Set Value.
special template class to simplify handling of ITX/PEAR
setSize($a_size)
Set Size.
This class represents a text property in a property form.
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
setOptions($a_options)
Set Options.
This class represents a custom property in a property form.
This class represents a non editable value in a property form.
This class represents a text area property in a property form.
$links
static _getParams($a_link_id)
Get dynamic parameter definitions.
static _isEnabled()
Check if dynamic parameters are enabled.
setRequired($a_required)
Set Required.
This class represents a external and/or internal link in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjLinkResourceGUI::initFormSettings ( )
protected

Show settings form.

Returns

Definition at line 250 of file class.ilObjLinkResourceGUI.php.

References ilObjectGUI\$object_service, $section, ilContainerSortingSettings\_lookupSortMode(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setValue(), ilTextAreaInputGUI\setValue(), ilContainer\SORT_MANUAL, and ilContainer\SORT_TITLE.

Referenced by saveSettings(), and settings().

251  {
252  $obj_service = $this->object_service;
253 
254  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
255  $this->form = new ilPropertyFormGUI();
256  $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveSettings'));
257  $this->form->setTitle($this->lng->txt('webr_edit_settings'));
258 
259  // Title
260  $tit = new ilTextInputGUI($this->lng->txt('webr_list_title'), 'tit');
261  $tit->setValue($this->object->getTitle());
262  $tit->setRequired(true);
263  $tit->setSize(40);
264  $tit->setMaxLength(127);
265  $this->form->addItem($tit);
266 
267  // Description
268  $des = new ilTextAreaInputGUI($this->lng->txt('webr_list_desc'), 'des');
269  $des->setValue($this->object->getDescription());
270  $des->setCols(40);
271  $des->setRows(3);
272  $this->form->addItem($des);
273 
275  $section->setTitle($this->lng->txt('obj_presentation'));
276  $this->form->addItem($section);
277 
278  // tile image
279  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
280 
281  // Sorting
282  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
283  include_once './Services/Container/classes/class.ilContainer.php';
284 
285  $sor = new ilRadioGroupInputGUI($this->lng->txt('webr_sorting'), 'sor');
286  $sor->setRequired(true);
287  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
288  $sor->setValue(ilContainerSortingSettings::_lookupSortMode($this->object->getId()));
289 
290  $opt = new ilRadioOption(
291  $this->lng->txt('webr_sort_title'),
293  );
294  $sor->addOption($opt);
295 
296  $opm = new ilRadioOption(
297  $this->lng->txt('webr_sort_manual'),
299  );
300  $sor->addOption($opm);
301  $this->form->addItem($sor);
302 
303  $this->form->addCommandButton('saveSettings', $this->lng->txt('save'));
304  $this->form->addCommandButton('view', $this->lng->txt('cancel'));
305  }
This class represents an option in a radio group.
This class represents a property form user interface.
This class represents a section header in a property form.
setValue($a_value)
Set Value.
$section
Definition: Utf8Test.php:83
This class represents a property in a property form.
This class represents a text property in a property form.
This class represents a text area property in a property form.
static _lookupSortMode($a_obj_id)
lookup sort mode
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isContainerMetaDataRequired()

ilObjLinkResourceGUI::isContainerMetaDataRequired ( )
protected

Check if a new container title is required Necessary if there is more than one link.

Returns

Definition at line 841 of file class.ilObjLinkResourceGUI.php.

References ilLinkResourceItems\lookupNumberOfLinks().

Referenced by initFormLink(), saveAddLink(), updateLink(), and updateLinks().

842  {
843  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
844  return ilLinkResourceItems::lookupNumberOfLinks($this->object->getId()) == 1;
845  }
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ linkChecker()

ilObjLinkResourceGUI::linkChecker ( )
protected

Show link validation.

Returns

Definition at line 1199 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilUser, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, __initLinkChecker(), ilLinkCheckNotify\_getNotifyStatus(), ilObject2GUI\checkPermission(), and ilCheckboxInputGUI\setValue().

Referenced by refreshLinkCheck(), and saveLinkCheck().

1200  {
1201  global $DIC;
1202 
1203  $ilias = $DIC['ilias'];
1204  $ilUser = $DIC['ilUser'];
1205  $tpl = $DIC['tpl'];
1206  $ilTabs = $DIC['ilTabs'];
1207 
1208  $this->checkPermission('write');
1209  $ilTabs->activateTab('id_link_check');
1210 
1211  $this->__initLinkChecker();
1212  $this->object->initLinkResourceItemsObject();
1213 
1214  require_once './Services/LinkChecker/classes/class.ilLinkCheckerTableGUI.php';
1215 
1216  $toolbar = new ilToolbarGUI();
1217 
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';
1221 
1222  $chb = new ilCheckboxInputGUI($this->lng->txt('link_check_message_a'), 'link_check_message');
1223  $chb->setValue(1);
1224  $chb->setChecked((bool) ilLinkCheckNotify::_getNotifyStatus($ilUser->getId(), $this->object->getId()));
1225  $chb->setOptionTitle($this->lng->txt('link_check_message_b'));
1226 
1227  $toolbar->addInputItem($chb);
1228  $toolbar->addFormButton($this->lng->txt('save'), 'saveLinkCheck');
1229  $toolbar->setFormAction($this->ctrl->getLinkTarget($this, 'saveLinkCheck'));
1230  }
1231 
1232  $tgui = new ilLinkCheckerTableGUI($this, 'linkChecker');
1233  $tgui->setLinkChecker($this->link_checker_obj)
1234  ->setRowHandler($this)
1235  ->setRefreshButton($this->lng->txt('refresh'), 'refreshLinkCheck');
1236 
1237  return $tpl->setContent($tgui->prepareHTML()->getHTML() . $toolbar->getHTML());
1238  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
This class represents a checkbox property in a property form.
class ilLinkCheckerTableGUI
setValue($a_value)
Set Value.
$ilUser
Definition: imgupload.php:18
static _getNotifyStatus($a_usr_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manage()

ilObjLinkResourceGUI::manage ( )
protected

Manage links.

Returns

Definition at line 919 of file class.ilObjLinkResourceGUI.php.

References $js, $table, activateTabs(), ilObject2GUI\checkPermission(), ilInternalLinkGUI\getInitHTML(), and showToolbar().

Referenced by view().

920  {
921  $this->checkPermission('write');
922  $this->activateTabs('content', 'id_content_manage');
923 
924  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.webr_manage.html', 'Modules/WebResource');
925  $this->showToolbar('ACTION_BUTTONS');
926 
927  include_once './Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
928  $table = new ilWebResourceEditableLinkTableGUI($this, 'view');
929  $table->parse();
930 
931  include_once './Services/Link/classes/class.ilInternalLinkGUI.php';
933 
934  $this->tpl->addJavaScript("Modules/WebResource/js/intLink.js");
935  $this->tpl->addJavascript("Services/Form/js/Form.js");
936 
937  $this->tpl->setVariable('TABLE_LINKS', $table->getHTML() . $js);
938  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
$js
if(empty($password)) $table
Definition: pwgen.php:24
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
showToolbar($a_tpl_var)
Show toolbar.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToLink()

ilObjLinkResourceGUI::redirectToLink (   $a_ref_id,
  $a_obj_id,
  $a_url 
)
protected

Definition at line 1556 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilUser, ilChangeEvent\_recordReadEvent(), and ilUtil\redirect().

Referenced by callDirectLink(), and callLink().

1557  {
1558  global $DIC;
1559 
1560  $ilUser = $DIC['ilUser'];
1561 
1562  if ($a_url) {
1563  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
1565  "webr",
1566  $a_ref_id,
1567  $a_obj_id,
1568  $ilUser->getId()
1569  );
1570 
1571  ilUtil::redirect($a_url);
1572  }
1573  }
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.
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
static redirect($a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ refreshLinkCheck()

ilObjLinkResourceGUI::refreshLinkCheck ( )

Definition at line 1267 of file class.ilObjLinkResourceGUI.php.

References __initLinkChecker(), and linkChecker().

1268  {
1269  $this->__initLinkChecker();
1270  $this->object->initLinkResourceItemsObject();
1271 
1272  // Set all link to valid. After check invalid links will be set to invalid
1273  $this->object->items_obj->updateValidByCheck();
1274 
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);
1280  }
1281 
1282  $this->object->items_obj->updateLastCheck();
1283  ilUtil::sendSuccess($this->lng->txt('link_checker_refreshed'));
1284 
1285  $this->linkChecker();
1286 
1287  return true;
1288  }
linkChecker()
Show link validation.
+ Here is the call graph for this function:

◆ save()

ilObjLinkResourceGUI::save ( )

Save new object public.

Definition at line 149 of file class.ilObjLinkResourceGUI.php.

References $_POST, $DIC, $ilCtrl, checkLinkInput(), initFormLink(), and ilUtil\sendFailure().

150  {
151  global $DIC;
152 
153  $ilCtrl = $DIC['ilCtrl'];
154 
155  $this->initFormLink(self::LINK_MOD_CREATE);
156  if ($this->checkLinkInput(self::LINK_MOD_CREATE, 0, 0)) {
157  // Save new object
158  $_POST['title'] = $_POST['tit'];
159  $_POST['desc'] = $_POST['des'];
160  parent::save();
161  } else {
162  // Data incomplete or invalid
163  ilUtil::sendFailure($this->lng->txt('err_check_input'));
164  $this->form->setValuesByPost();
165  $this->tpl->setContent($this->form->getHTML());
166  }
167  }
global $DIC
Definition: saml.php:7
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initFormLink($a_mode)
Show create/edit single link.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveAddLink()

ilObjLinkResourceGUI::saveAddLink ( )

Save form data.

Returns

Definition at line 380 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilCtrl, ilParameterAppender\_isEnabled(), activateTabs(), checkLinkInput(), ilObject2GUI\checkPermission(), initFormLink(), isContainerMetaDataRequired(), and ilUtil\sendFailure().

381  {
382  global $DIC;
383 
384  $ilCtrl = $DIC['ilCtrl'];
385 
386  $this->checkPermission('write');
387 
388  $this->initFormLink(self::LINK_MOD_ADD);
389  if ($this->checkLinkInput(self::LINK_MOD_ADD, $this->object->getId(), 0)) {
390  if ($this->isContainerMetaDataRequired()) {
391  // Save list data
392  $this->object->setTitle($this->form->getInput('lti'));
393  $this->object->setDescription($this->form->getInput('tde'));
394  $this->object->update();
395  }
396 
397  // Save Link
398  $link_id = $this->link->add();
399  $this->link->updateValid(true);
400 
401  // Dynamic parameters
402  if (ilParameterAppender::_isEnabled() and is_object($this->dynamic)) {
403  $this->dynamic->add($link_id);
404  }
405  ilUtil::sendSuccess($this->lng->txt('webr_link_added'), true);
406  $ilCtrl->redirect($this, 'view');
407  }
408  // Error handling
409  ilUtil::sendFailure($this->lng->txt('err_check_input'));
410  $this->form->setValuesByPost();
411 
412  $this->activateTabs('content', 'id_content_view');
413  $this->tpl->setContent($this->form->getHTML());
414  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
global $ilCtrl
Definition: ilias.php:18
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initFormLink($a_mode)
Show create/edit single link.
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:

◆ saveLinkCheck()

ilObjLinkResourceGUI::saveLinkCheck ( )

Definition at line 1240 of file class.ilObjLinkResourceGUI.php.

References $_POST, $DIC, $ilDB, $ilUser, and linkChecker().

1241  {
1242  global $DIC;
1243 
1244  $ilDB = $DIC['ilDB'];
1245  $ilUser = $DIC['ilUser'];
1246 
1247  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
1248 
1249  $link_check_notify = new ilLinkCheckNotify($ilDB);
1250  $link_check_notify->setUserId($ilUser->getId());
1251  $link_check_notify->setObjId($this->object->getId());
1252 
1253  if ($_POST['link_check_message']) {
1254  ilUtil::sendSuccess($this->lng->txt('link_check_message_enabled'));
1255  $link_check_notify->addNotifier();
1256  } else {
1257  ilUtil::sendSuccess($this->lng->txt('link_check_message_disabled'));
1258  $link_check_notify->deleteNotifier();
1259  }
1260  $this->linkChecker();
1261 
1262  return true;
1263  }
global $DIC
Definition: saml.php:7
class for checking external links in page objects.
linkChecker()
Show link validation.
$ilUser
Definition: imgupload.php:18
global $ilDB
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettings()

ilObjLinkResourceGUI::saveSettings ( )
protected

Save container settings.

Returns

Definition at line 211 of file class.ilObjLinkResourceGUI.php.

References $DIC, ilObjectGUI\$object_service, ilObject2GUI\checkPermission(), initFormSettings(), ilUtil\sendFailure(), and ilContainerSortingSettings\setSortMode().

212  {
213  global $DIC;
214 
215  $obj_service = $this->object_service;
216  $ilTabs = $DIC['ilTabs'];
217 
218  $this->checkPermission('write');
219  $ilTabs->activateTab('id_settings');
220 
221  $this->initFormSettings();
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();
226 
227  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
228  $sort = new ilContainerSortingSettings($this->object->getId());
229  $sort->setSortMode($this->form->getInput('sor'));
230  $sort->update();
231 
232  // tile image
233  $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
234 
235 
236  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
237  $this->ctrl->redirect($this, 'settings');
238  }
239 
240  $this->form->setValuesByPost();
241  ilUtil::sendFailure($this->lng->txt('err_check_input'));
242  $this->tpl->setContent($this->form->getHTML());
243  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
initFormSettings()
Show settings form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ saveSorting()

ilObjLinkResourceGUI::saveSorting ( )
protected

Save nmanual sorting.

Returns

Definition at line 980 of file class.ilObjLinkResourceGUI.php.

References $_POST, ilContainerSorting\_getInstance(), ilObject2GUI\checkPermission(), and view().

981  {
982  $this->checkPermission('write');
983 
984  include_once './Services/Container/classes/class.ilContainerSorting.php';
985  $sort = ilContainerSorting::_getInstance($this->object->getId());
986  $sort->savePost((array) $_POST['position']);
987 
988  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
989  $this->view();
990  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
static _getInstance($a_obj_id)
get instance by obj_id
$_POST["username"]
+ Here is the call graph for this function:

◆ setTabs()

ilObjLinkResourceGUI::setTabs ( )

get tabs public

Definition at line 1362 of file class.ilObjLinkResourceGUI.php.

References $DIC, ilObjectGUI\$lng, ilObject2GUI\checkPermissionBool(), ilObject2GUI\getCreationMode(), and ilLinkResourceItems\lookupNumberOfLinks().

1363  {
1364  global $DIC;
1365 
1366  $ilTabs = $DIC['ilTabs'];
1367  $lng = $DIC['lng'];
1368  $ilHelp = $DIC['ilHelp'];
1369 
1370  $ilHelp->setScreenIdComponent("webr");
1371 
1372  if ($this->checkPermissionBool('read')) {
1373  $ilTabs->addTab(
1374  "id_content",
1375  $lng->txt("content"),
1376  $this->ctrl->getLinkTarget($this, "view")
1377  );
1378  }
1379 
1380  if (
1381  $this->checkPermissionBool('visible') ||
1382  $this->checkPermissionBool('read')
1383  ) {
1384  $ilTabs->addTab(
1385  "id_info",
1386  $lng->txt("info_short"),
1387  $this->ctrl->getLinkTarget($this, "infoScreen")
1388  );
1389  }
1390 
1391  if ($this->checkPermissionBool('write') and !$this->getCreationMode()) {
1392  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
1393  if (ilLinkResourceItems::lookupNumberOfLinks($this->object->getId()) > 1) {
1394  $ilTabs->addTab(
1395  "id_settings",
1396  $lng->txt("settings"),
1397  $this->ctrl->getLinkTarget($this, "settings")
1398  );
1399  }
1400  }
1401 
1402  if ($this->checkPermissionBool('write')) {
1403  $ilTabs->addTab(
1404  "id_history",
1405  $lng->txt("history"),
1406  $this->ctrl->getLinkTarget($this, "history")
1407  );
1408  }
1409 
1410  if ($this->checkPermissionBool('write')) {
1411  // Check if pear library is available
1412  $ilTabs->addTab(
1413  "id_link_check",
1414  $lng->txt("link_check"),
1415  $this->ctrl->getLinkTarget($this, "linkChecker")
1416  );
1417  }
1418 
1419  if ($this->checkPermissionBool('write')) {
1420  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
1421  $mdgui = new ilObjectMetaDataGUI($this->object);
1422  $mdtab = $mdgui->getTab();
1423  if ($mdtab) {
1424  $ilTabs->addTab(
1425  "id_meta_data",
1426  $lng->txt("meta_data"),
1427  $mdtab
1428  );
1429  }
1430  }
1431 
1432  if ($this->checkPermissionBool('write')) {
1433  $ilTabs->addTab(
1434  'export',
1435  $this->lng->txt('export'),
1436  $this->ctrl->getLinkTargetByClass('ilexportgui', '')
1437  );
1438  }
1439 
1440  // will add permission tab if needed
1441  parent::setTabs();
1442  }
Class ilObjectMetaDataGUI.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
static lookupNumberOfLinks($a_webr_id)
Get number of assigned links.
+ Here is the call graph for this function:

◆ settings()

ilObjLinkResourceGUI::settings ( )
protected

Edit settings Title, Description, Sorting.

Returns

Definition at line 194 of file class.ilObjLinkResourceGUI.php.

References $DIC, ilObject2GUI\checkPermission(), and initFormSettings().

195  {
196  global $DIC;
197 
198  $ilTabs = $DIC['ilTabs'];
199 
200  $this->checkPermission('write');
201  $ilTabs->activateTab('id_settings');
202 
203  $this->initFormSettings();
204  $this->tpl->setContent($this->form->getHTML());
205  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
initFormSettings()
Show settings form.
+ Here is the call graph for this function:

◆ setValuesFromLink()

ilObjLinkResourceGUI::setValuesFromLink (   $a_link_id)
protected

Set form values from link.

Parameters
object$a_link_id
Returns

Definition at line 575 of file class.ilObjLinkResourceGUI.php.

References $values, and ilParameterAppender\_isEnabled().

Referenced by editLink().

576  {
577  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
578  $link = new ilLinkResourceItems($this->object->getId());
579 
580  $values = $link->getItem($a_link_id);
581 
583  }
584 
585  $this->form->setValuesByArray(
586  array(
587  'tit' => $values['title'],
588  'tar' => $values['target'],
589  'des' => $values['description'],
590  'act' => (int) $values['active'],
591  'che' => (int) $values['disable_check'],
592  'vali' => (int) $values['valid']
593  )
594  );
595  }
$values
Class ilObjLinkResourceGUI.
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLinks()

ilObjLinkResourceGUI::showLinks ( )
protected

Show all active links.

Returns

Definition at line 944 of file class.ilObjLinkResourceGUI.php.

References $table, activateTabs(), ilObject2GUI\checkPermission(), and showToolbar().

Referenced by view().

945  {
946  $this->checkPermission('read');
947  $this->activateTabs('content', 'id_content_view');
948 
949  include_once './Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
950  $table = new ilWebResourceLinkTableGUI($this, 'showLinks');
951  $table->parse();
952 
953  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.webr_view.html', 'Modules/WebResource');
954  $this->showToolbar('ACTION_BUTTONS');
955  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
956  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
TableGUI class for search results.
if(empty($password)) $table
Definition: pwgen.php:24
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
showToolbar($a_tpl_var)
Show toolbar.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showToolbar()

ilObjLinkResourceGUI::showToolbar (   $a_tpl_var)
protected

Show toolbar.

Parameters
string$a_tpl_varName of template variable
Returns

Definition at line 998 of file class.ilObjLinkResourceGUI.php.

References ilObject2GUI\checkPermissionBool().

Referenced by manage(), showLinks(), and sort().

999  {
1000  if (!$this->checkPermissionBool('write')) {
1001  return;
1002  }
1003 
1004  include_once './Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
1005  $tool = new ilToolbarGUI();
1006  $tool->setFormAction($this->ctrl->getFormAction($this));
1007  $tool->addButton(
1008  $this->lng->txt('webr_add'),
1009  $this->ctrl->getLinkTarget($this, 'addLink')
1010  );
1011 
1012  $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
1013  return;
1014  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sort()

ilObjLinkResourceGUI::sort ( )
protected

Sort web links.

Returns

Definition at line 962 of file class.ilObjLinkResourceGUI.php.

References $table, activateTabs(), ilObject2GUI\checkPermission(), and showToolbar().

Referenced by view().

963  {
964  $this->checkPermission('write');
965  $this->activateTabs('content', 'id_content_ordering');
966 
967  include_once './Modules/WebResource/classes/class.ilWebResourceLinkTableGUI.php';
968  $table = new ilWebResourceLinkTableGUI($this, 'sort', true);
969  $table->parse();
970 
971  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.webr_view.html', 'Modules/WebResource');
972  $this->showToolbar('ACTION_BUTTONS');
973  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
974  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
TableGUI class for search results.
if(empty($password)) $table
Definition: pwgen.php:24
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
showToolbar($a_tpl_var)
Show toolbar.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchViewMode()

ilObjLinkResourceGUI::switchViewMode ( )
protected

Switch between "View" "Manage" and "Sort".

Returns

Definition at line 851 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $ilCtrl, and view().

Referenced by editLinks().

852  {
853  global $DIC;
854 
855  $ilCtrl = $DIC['ilCtrl'];
856 
857  $_REQUEST['view_mode'] = $_GET['view_mode'] = (int) $_GET['switch_mode'];
858  $this->view();
859  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLink()

ilObjLinkResourceGUI::updateLink ( )

Save after editing.

Returns

Definition at line 335 of file class.ilObjLinkResourceGUI.php.

References $DIC, $ilCtrl, ilParameterAppender\_isEnabled(), checkLinkInput(), initFormLink(), isContainerMetaDataRequired(), and ilUtil\sendFailure().

336  {
337  global $DIC;
338 
339  $ilCtrl = $DIC['ilCtrl'];
340 
341  $this->initFormLink(self::LINK_MOD_EDIT);
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();
345  if (ilParameterAppender::_isEnabled() and is_object($this->dynamic)) {
346  $this->dynamic->add((int) $_REQUEST['link_id']);
347  }
348 
349  if ($this->isContainerMetaDataRequired()) {
350  $this->object->setTitle($this->form->getInput('tit'));
351  $this->object->setDescription($this->form->getInput('des'));
352  $this->object->update();
353  }
354 
355  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
356  $ilCtrl->redirect($this, 'view');
357  }
358  ilUtil::sendFailure($this->lng->txt('err_check_input'));
359  $this->form->setValuesByPost();
360  $this->tpl->setContent($this->form->getHTML());
361  }
global $DIC
Definition: saml.php:7
checkLinkInput($a_mode, $a_webr_id=0, $a_link_id=0)
Check input after creating a new link.
global $ilCtrl
Definition: ilias.php:18
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
initFormLink($a_mode)
Show create/edit single link.
static _isEnabled()
Check if dynamic parameters are enabled.
+ Here is the call graph for this function:

◆ updateLinks()

ilObjLinkResourceGUI::updateLinks ( )
protected

Update all visible links.

Returns

Definition at line 469 of file class.ilObjLinkResourceGUI.php.

References $_POST, ilObjectGUI\$data, $DIC, $ilCtrl, $links, $table, activateTabs(), ilObject2GUI\checkPermission(), isContainerMetaDataRequired(), ilLinkInputGUI\isInternalLink(), ilLinkResourceItems\lookupItem(), ilUtil\sendFailure(), ilParameterAppender\setName(), and ilUtil\stripSlashes().

470  {
471  global $DIC;
472 
473  $ilCtrl = $DIC['ilCtrl'];
474 
475  $this->checkPermission('write');
476  $this->activateTabs('content', '');
477 
478  if (!is_array($_POST['ids'])) {
479  ilUtil::sendFailure($this->lng->txt('select_one'), true);
480  $ilCtrl->redirect($this, 'view');
481  }
482 
483  // Validate
484  $invalid = array();
485  foreach ($_POST['ids'] as $link_id) {
486  $data = $_POST['links'][$link_id];
487 
488  // handle internal links
489  if ($_POST['tar_' . $link_id . '_ajax_type'] &&
490  $_POST['tar_' . $link_id . '_ajax_id']) {
491  $data['tar'] = $_POST['links'][$link_id]['tar'] =
492  $_POST['tar_' . $link_id . '_ajax_type'] . '|' .
493  $_POST['tar_' . $link_id . '_ajax_id'];
494  }
495 
496 
497  if (!strlen($data['tit'])) {
498  $invalid[] = $link_id;
499  continue;
500  }
501  if (!strlen($data['tar'])) {
502  $invalid[] = $link_id;
503  continue;
504  }
505  if ($data['nam'] and !$data['val']) {
506  $invalid[] = $link_id;
507  continue;
508  }
509  if (!$data['nam'] and $data['val']) {
510  $invalid[] = $link_id;
511  continue;
512  }
513  }
514 
515  if (count($invalid)) {
516  ilUtil::sendFailure($this->lng->txt('err_check_input'));
517  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.webr_manage.html', 'Modules/WebResource');
518 
519  include_once './Modules/WebResource/classes/class.ilWebResourceEditableLinkTableGUI.php';
520  $table = new ilWebResourceEditableLinkTableGUI($this, 'view');
521  $table->setInvalidLinks($invalid);
522  $table->parseSelectedLinks($_POST['ids']);
523  $table->updateFromPost();
524  $this->tpl->setVariable('TABLE_LINKS', $table->getHTML());
525  return false;
526  }
527 
528  include_once './Modules/WebResource/classes/class.ilLinkResourceItems.php';
529  $links = new ilLinkResourceItems($this->object->getId());
530 
531  // Save Settings
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) {
535  $data = $_POST['links'][$link_id];
536 
537  $orig = ilLinkResourceItems::lookupItem($this->object->getId(), $link_id);
538 
539  $links->setLinkId($link_id);
540  $links->setTitle(ilUtil::stripSlashes($data['tit']));
541  $links->setDescription(ilUtil::stripSlashes($data['des']));
542  $links->setTarget(str_replace('"', '', ilUtil::stripSlashes($data['tar'])));
543  $links->setActiveStatus((int) $data['act']);
544  $links->setDisableCheckStatus((int) $data['che']);
545  $links->setLastCheckDate($orig['last_check']);
546  $links->setValidStatus((int) $data['vali']);
547  $links->setInternal(ilLinkInputGUI::isInternalLink($data['tar']));
548  $links->update();
549 
550  if (strlen($data['nam']) and $data['val']) {
551  $param = new ilParameterAppender($this->object->getId());
552  $param->setName(ilUtil::stripSlashes($data['nam']));
553  $param->setValue((int) $data['val']);
554  $param->add($link_id);
555  }
556 
557  if ($this->isContainerMetaDataRequired()) {
558  $this->object->setTitle(ilUtil::stripSlashes($data['tit']));
559  $this->object->setDescription(ilUtil::stripSlashes($data['des']));
560  $this->object->update();
561  }
562 
563  // TODO: Dynamic parameters
564  }
565 
566  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
567  $ilCtrl->redirect($this, 'view');
568  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
static isInternalLink($a_value)
static lookupItem($a_webr_id, $a_link_id)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
isContainerMetaDataRequired()
Check if a new container title is required Necessary if there is more than one link.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Class ilObjLinkResourceGUI.
Class ilParameterAppender.
$links
if(empty($password)) $table
Definition: pwgen.php:24
activateTabs($a_active_tab, $a_active_subtab='')
Activate tab and subtabs.
$_POST["username"]
+ Here is the call graph for this function:

◆ view()

ilObjLinkResourceGUI::view ( )

View object.

Returns

Definition at line 876 of file class.ilObjLinkResourceGUI.php.

References $_GET, $DIC, $GLOBALS, ilObjectGUI\$ilErr, ilContainerSortingSettings\_lookupSortMode(), ilObject2GUI\checkPermission(), manage(), showLinks(), sort(), and ilContainer\SORT_MANUAL.

Referenced by confirmDeleteLink(), saveSorting(), and switchViewMode().

877  {
878  global $DIC;
879 
880  $ilErr = $DIC['ilErr'];
881  $ilTabs = $DIC['ilTabs'];
882 
883  $ilTabs->activateTab("id_content");
884 
885  $this->checkPermission('read');
886 
887  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
888  parent::view();
889  return true;
890  } else {
891  switch ((int) $_REQUEST['view_mode']) {
892  case self::VIEW_MODE_MANAGE:
893  $this->manage();
894  break;
895 
896  case self::VIEW_MODE_SORT:
897  // #14638
898  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
900  $this->sort();
901  break;
902  }
903  // fallthrough
904 
905  // no break
906  default:
907  $this->showLinks();
908  break;
909  }
910  }
911  $GLOBALS['DIC']['tpl']->setPermanentLink($this->object->getType(), $this->object->getRefId());
912  return true;
913  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
showLinks()
Show all active links.
static _lookupSortMode($a_obj_id)
lookup sort mode
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ LINK_MOD_ADD

const ilObjLinkResourceGUI::LINK_MOD_ADD = 3

Definition at line 30 of file class.ilObjLinkResourceGUI.php.

◆ LINK_MOD_CREATE

const ilObjLinkResourceGUI::LINK_MOD_CREATE = 1

Definition at line 28 of file class.ilObjLinkResourceGUI.php.

◆ LINK_MOD_EDIT

const ilObjLinkResourceGUI::LINK_MOD_EDIT = 2

Definition at line 29 of file class.ilObjLinkResourceGUI.php.

◆ VIEW_MODE_MANAGE

const ilObjLinkResourceGUI::VIEW_MODE_MANAGE = 2

Definition at line 25 of file class.ilObjLinkResourceGUI.php.

◆ VIEW_MODE_SORT

const ilObjLinkResourceGUI::VIEW_MODE_SORT = 3

Definition at line 26 of file class.ilObjLinkResourceGUI.php.

◆ VIEW_MODE_VIEW

const ilObjLinkResourceGUI::VIEW_MODE_VIEW = 1

Definition at line 24 of file class.ilObjLinkResourceGUI.php.


The documentation for this class was generated from the following file: