ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjLinkResourceGUI Class Reference

Class ilObjLinkResourceGUI. More...

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

Public Member Functions

 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 getType ()
 
 executeCommand ()
 
 save ()
 
 saveObject ()
 
 editLink ()
 
 updateLink ()
 
 getLinkToListModal ()
 Get form to transform a single weblink to a weblink list. More...
 
 saveLinkList ()
 
 addLink ()
 
 saveAddLink ()
 
 view ()
 
 infoScreen ()
 instead of redirecting here, links to the info screen should directly lead to the right place, but it looks like this needs some restructuring. More...
 
 infoScreenForward ()
 show information screen More...
 
 callDirectLink ()
 
 callLink ()
 
 exportHTML ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 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 (bool $mode=true)
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target, $a_additional=null)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 getWebLinkRepo ()
 
 initViewMode (?int $new_view_mode=null)
 
 initCreateForm (string $new_type)
 
 afterSave (ilObject $new_object)
 
 settings ()
 
 initFormSettings ()
 
 deleteParameter ()
 
 deleteParameterForm ()
 
 updateLinks ()
 
 setValuesFromLink (int $a_link_id)
 
 initList (int $a_mode)
 
 checkLinkInput (int $a_mode, bool $a_valid, ?int $a_link_id=null)
 
 initFormLink (int $a_mode)
 
 addLinkInputToForm (int $mode)
 
 switchViewMode (?int $force_view_mode=null)
 Switch between "View" "Manage" and "Sort". More...
 
 editLinks ()
 Start with manage mode. More...
 
 manage ()
 
 showLinks ()
 
 sort ()
 
 saveSorting ()
 
 showToolbar (string $a_tpl_var)
 
 confirmDeleteLink ()
 
 deleteLinks ()
 
 deactivateLink ()
 
 activateTabs (string $a_active_tab, string $a_active_subtab='')
 Activate tab and subtabs. More...
 
 setTabs ()
 
 addLocatorItems ()
 
 redirectToLink (int $a_ref_id, int $a_obj_id, string $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 ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 
 setTargetFrame (string $cmd, string $target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId (int $ref_id, string $cmd="")
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 
 showActions ()
 
 getTabs ()
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $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 ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

const int VIEW_MODE_VIEW = 1
 
const int VIEW_MODE_MANAGE = 2
 
const int VIEW_MODE_SORT = 3
 
const int LINK_MOD_CREATE = 1
 
const int LINK_MOD_EDIT = 2
 
const int LINK_MOD_ADD = 3
 
const int LINK_MOD_SET_LIST = 4
 
const int LINK_MOD_ASYNC = 6
 
HTTPService $http
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = []
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Private Member Functions

 __prepareOutput ()
 

Private Attributes

int $view_mode = self::VIEW_MODE_VIEW
 
ilPropertyFormGUI $form = null
 
ilWebLinkDraftItem $draft_item = null
 
ilWebLinkDraftParameter $draft_parameter = null
 
ilWebLinkDraftList $draft_list = null
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
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 ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjLinkResourceGUI::__construct ( int  $id = 0,
int  $id_type = self::REPOSITORY_NODE_ID,
int  $parent_node_id = 0 
)

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

References $DIC, ilObjectGUI\$id, ilObject2GUI\$id_type, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and settings().

57  {
58  global $DIC;
59 
60  parent::__construct($id, $id_type, $parent_node_id);
61 
62  $this->lng->loadLanguageModule("webr");
63  $this->http = $DIC->http();
64  $this->settings = $DIC->settings();
65  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __prepareOutput()

ilObjLinkResourceGUI::__prepareOutput ( )
private

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

Referenced by executeCommand().

1587  : void
1588  {
1589  $this->tpl->setLocator();
1590  }
+ Here is the caller graph for this function:

◆ _goto()

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

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

References ilObject2GUI\$ctrl, $DIC, $ilErr, ilObject2GUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilUtil\redirect(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), ilCtrl\setTargetScript(), and ilLanguage\txt().

Referenced by ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

1698  : void
1699  {
1700  global $DIC;
1701 
1702  $main_tpl = $DIC->ui()->mainTemplate();
1703  $ilAccess = $DIC->access();
1704  $lng = $DIC->language();
1705  $ctrl = $DIC->ctrl();
1706  $ilErr = $DIC['ilErr'];
1707 
1708  if ($a_additional && substr($a_additional, -3) == "wsp") {
1709  $ctrl->setTargetScript('ilias.php');
1711  ilSharedResourceGUI::class,
1712  'wsp_id',
1713  $a_target
1714  );
1716  [
1717  ilSharedResourceGUI::class
1718  ],
1719  'edit'
1720  );
1721  return;
1722  }
1723 
1724  // Will be replaced in future releases by ilAccess::checkAccess()
1725  if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
1727  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target
1728  );
1729  } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1731  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target . "&cmd=infoScreen"
1732  );
1733  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1734  $main_tpl->setOnScreenMessage(
1735  'failure',
1736  sprintf(
1737  $lng->txt("msg_no_perm_read_item"),
1740  (int) $a_target
1741  )
1742  )
1743  ),
1744  true
1745  );
1747  }
1748 
1749  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1750  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
setParameterByClass(string $a_class, string $a_parameter, $a_value)
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
$ilErr
Definition: raiseError.php:33
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:22
static redirect(string $a_script)
setTargetScript(string $a_target_script)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ activateTabs()

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

Activate tab and subtabs.

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

References ilContainerSortingSettings\_lookupSortMode(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilContainer\SORT_MANUAL.

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

1479  : void {
1480  switch ($a_active_tab) {
1481  case 'content':
1482  if ($this->checkPermissionBool('write')) {
1483  $this->lng->loadLanguageModule('cntr');
1484 
1485  $this->ctrl->setParameter(
1486  $this,
1487  'switch_mode',
1488  self::VIEW_MODE_VIEW
1489  );
1490  $this->tabs_gui->addSubTab(
1491  'id_content_view',
1492  $this->lng->txt('view'),
1493  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1494  );
1495  $this->ctrl->setParameter(
1496  $this,
1497  'switch_mode',
1498  self::VIEW_MODE_MANAGE
1499  );
1500  $this->tabs_gui->addSubTab(
1501  'id_content_manage',
1502  $this->lng->txt('cntr_manage'),
1503  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1504  );
1505  if (!$this->getWebLinkRepo()->doesOnlyOneItemExist() and
1507  $this->object->getId()
1508  ) == ilContainer::SORT_MANUAL) {
1509  $this->ctrl->setParameter(
1510  $this,
1511  'switch_mode',
1512  self::VIEW_MODE_SORT
1513  );
1514  $this->tabs_gui->addSubTab(
1515  'id_content_ordering',
1516  $this->lng->txt('cntr_ordering'),
1517  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1518  );
1519  }
1520 
1521  $this->ctrl->clearParameters($this);
1522  $this->tabs_gui->activateSubTab($a_active_subtab);
1523  }
1524  }
1525 
1526  $this->tabs_gui->activateTab('id_content');
1527  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLink()

ilObjLinkResourceGUI::addLink ( )

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

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

547  : void
548  {
549  $this->checkPermission('write');
550  $this->activateTabs('content', 'id_content_view');
551 
552  $form = $this->initFormLink(self::LINK_MOD_ADD);
553  $this->tpl->setContent($form->getHTML());
554  }
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ addLinkInputToForm()

ilObjLinkResourceGUI::addLinkInputToForm ( int  $mode)
protected

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

References ILIAS\Repository\form(), ilLinkInputGUI\LIST, ILIAS\Repository\lng(), and ilLinkInputGUI\setAllowedLinkTypes().

Referenced by initFormLink().

1109  : void
1110  {
1111  $tar = new ilLinkInputGUI(
1112  $this->lng->txt('type'),
1113  'tar'
1114  ); // lng var
1115  if ($mode == self::LINK_MOD_CREATE) {
1117  }
1118  $tar->setInternalLinkFilterTypes(
1119  [
1120  "PageObject",
1121  "GlossaryItem",
1122  "RepositoryItem",
1123  'WikiPage'
1124  ]
1125  );
1126  $tar->setExternalLinkMaxLength(1000);
1127  $tar->setInternalLinkFilterTypes(
1128  ["PageObject", "GlossaryItem", "RepositoryItem"]
1129  );
1130  $tar->setRequired(true);
1131  $this->form->addItem($tar);
1132  }
setAllowedLinkTypes(string $a_val)
Set allowed link types (LIST, BOTH, INT, EXT)
form( $class_path, string $cmd, string $submit_caption="")
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:

◆ addLocatorItems()

ilObjLinkResourceGUI::addLocatorItems ( )
protected
Todo:
is this required?

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

References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

1595  : void
1596  {
1597  global $DIC;
1598 
1599  $ilLocator = $DIC['ilLocator'];
1600  if (is_object($this->object)) {
1601  $ilLocator->addItem(
1602  $this->object->getTitle(),
1603  $this->ctrl->getLinkTarget($this),
1604  "",
1605  $this->object->getRefId(),
1606  "webr"
1607  );
1608  }
1609  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ afterSave()

ilObjLinkResourceGUI::afterSave ( ilObject  $new_object)
protected

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

References ilWebLinkDatabaseRepository\createItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObject\getId(), ilObject\getRefId(), ILIAS\Repository\lng(), and ilUtil\redirect().

Referenced by saveObject().

245  : void
246  {
247  $new_web_link_repo = new ilWebLinkDatabaseRepository($new_object->getId());
248 
249  if ($this->form->getInput('tar_mode_type') === 'single') {
250  // Save link
251  $new_web_link_repo->createItem($this->draft_item);
252  $this->tpl->setOnScreenMessage(
253  'success',
254  $this->lng->txt('webr_link_added')
255  );
256  }
257 
258  if ($this->form->getInput('tar_mode_type') === 'list') {
259  // Save list
260  $new_web_link_repo->createList($this->draft_list);
261  $this->tpl->setOnScreenMessage(
262  'success',
263  $this->lng->txt('webr_list_added')
264  );
265  }
266 
267  // personal workspace
268  if ($this->id_type == self::WORKSPACE_NODE_ID) {
269  $this->ctrl->redirect($this, "editLinks");
270  } // repository
271  else {
273  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" .
274  $new_object->getRefId() . "&cmd=switchViewMode&switch_mode=2"
275  );
276  }
277  }
createItem(ilWebLinkDraftItem $item)
Creates a new item, complete with parameters.
static redirect(string $a_script)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ callDirectLink()

ilObjLinkResourceGUI::callDirectLink ( )

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

References ilObjectGUI\$obj_id, ilObjLinkResourceAccess\_getFirstLink(), getWebLinkRepo(), and redirectToLink().

1611  : void
1612  {
1613  $obj_id = $this->object->getId();
1614 
1615  if ($this->getWebLinkRepo()->doesOnlyOneItemExist(true)) {
1617 
1618  $this->redirectToLink(
1619  $this->ref_id,
1620  $obj_id,
1621  $item->getResolvedLink((bool) $this->settings->get('links_dynamic'))
1622  );
1623  }
1624  }
redirectToLink(int $a_ref_id, int $a_obj_id, string $a_url)
static _getFirstLink(int $a_webr_id)
Get first link item Check before with _isSingular() if there is more or less than one...
+ Here is the call graph for this function:

◆ callLink()

ilObjLinkResourceGUI::callLink ( )

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

References getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\object(), redirectToLink(), ILIAS\Repository\refinery(), and settings().

1626  : void
1627  {
1628  if ($this->http->wrapper()->query()->has('link_id')) {
1629  $link_id = $this->http->wrapper()->query()->retrieve(
1630  'link_id',
1631  $this->refinery->kindlyTo()->int()
1632  );
1633 
1634  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
1635 
1636  $this->redirectToLink(
1637  $this->ref_id,
1638  $this->object->getId(),
1639  $item->getResolvedLink((bool) $this->settings->get('links_dynamic'))
1640  );
1641  }
1642  }
redirectToLink(int $a_ref_id, int $a_obj_id, string $a_url)
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ checkLinkInput()

ilObjLinkResourceGUI::checkLinkInput ( int  $a_mode,
bool  $a_valid,
?int  $a_link_id = null 
)
protected

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

References ilObject2GUI\$error, $valid, ILIAS\Repository\form(), ilLinkInputGUI\isInternalLink(), ilWebLinkDraftParameter\LINKS_ERR_NO_NAME, ilWebLinkDraftParameter\LINKS_ERR_NO_VALUE, ILIAS\Repository\lng(), null, and settings().

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

841  : bool {
842  $valid = $a_valid;
843 
844  $link_input = $this->form->getInput('tar');
845  $active = false;
846 
847  if ($a_mode == self::LINK_MOD_CREATE) {
848  $active = true;
849  } else {
850  $active = (bool) $this->form->getInput('act');
851  }
852 
853  $this->draft_item = new ilWebLinkDraftItem(
854  ilLinkInputGUI::isInternalLink($link_input),
855  $this->form->getInput('title'),
856  $this->form->getInput('desc'),
857  str_replace('"', '', $link_input),
858  $active,
859  []
860  );
861 
862  if (!$this->settings->get('links_dynamic')) {
863  return $valid;
864  }
865 
866  $this->draft_parameter = new ilWebLinkDraftParameter(
867  (int) $this->form->getInput('val'),
868  $this->form->getInput('nam')
869  );
870 
871  $error = $this->draft_parameter->validate();
872  if (!$error) {
873  return $valid;
874  }
875 
876  $this->draft_parameter = null;
877 
878  switch ($error) {
880  $this->form->getItemByPostVar('nam')->setAlert(
881  $this->lng->txt('links_no_name_given')
882  );
883  return false;
884 
886  $this->form->getItemByPostVar('val')->setAlert(
887  $this->lng->txt('links_no_value_given')
888  );
889  return false;
890 
891  default:
892  // Nothing entered => no error
893  return $valid;
894  }
895  }
Draft class for creating and updating a parameter attached to Web Link items.
ilErrorHandling $error
$valid
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
form( $class_path, string $cmd, string $submit_caption="")
static isInternalLink(string $a_value)
Draft class for creating and updating a Web Link item.
const string LINKS_ERR_NO_NAME
TODO: This can be removed when validate is.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteLink()

ilObjLinkResourceGUI::confirmDeleteLink ( )
protected

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

References activateTabs(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and view().

1322  : void
1323  {
1324  $this->checkPermission('write');
1325  $this->activateTabs('content', 'id_content_view');
1326 
1327  $link_ids = [];
1328  if ($this->http->wrapper()->query()->has('link_id')) {
1329  $link_ids = (array) $this->http->wrapper()->query()->retrieve(
1330  'link_id',
1331  $this->refinery->kindlyTo()->int()
1332  );
1333  } elseif ($this->http->wrapper()->post()->has('link_ids')) {
1334  $link_ids = $this->http->wrapper()->post()->retrieve(
1335  'link_ids',
1336  $this->refinery->kindlyTo()->dictOf(
1337  $this->refinery->kindlyTo()->int()
1338  )
1339  );
1340  }
1341  if ($link_ids === []) {
1342  $this->tpl->setOnScreenMessage(
1343  'failure',
1344  $this->lng->txt('select_one')
1345  );
1346  $this->view();
1347  return;
1348  }
1349 
1350  $confirm = new ilConfirmationGUI();
1351  $confirm->setFormAction($this->ctrl->getFormAction($this, 'view'));
1352  $confirm->setHeaderText($this->lng->txt('webr_sure_delete_items'));
1353  $confirm->setConfirm($this->lng->txt('delete'), 'deleteLinks');
1354  $confirm->setCancel($this->lng->txt('cancel'), 'view');
1355 
1356  $items = $this->getWebLinkRepo()->getAllItemsAsContainer()->getItems();
1357 
1358  foreach ($items as $item) {
1359  if (!in_array($item->getLinkId(), $link_ids)) {
1360  continue;
1361  }
1362  $confirm->addItem(
1363  'link_ids[]',
1364  (string) $item->getLinkId(),
1365  $item->getTitle()
1366  );
1367  }
1368  $this->tpl->setContent($confirm->getHTML());
1369  }
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ deactivateLink()

ilObjLinkResourceGUI::deactivateLink ( )
protected

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

References ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

1397  : void
1398  {
1399  $this->checkPermission('write');
1400 
1401  $link_id = 0;
1402  if ($this->http->wrapper()->query()->has('link_id')) {
1403  $link_id = $this->http->wrapper()->query()->retrieve(
1404  'link_id',
1405  $this->refinery->kindlyTo()->int()
1406  );
1407  }
1408  if (!$link_id) {
1409  $this->tpl->setOnScreenMessage(
1410  'failure',
1411  $this->lng->txt('select_one'),
1412  true
1413  );
1414  $this->ctrl->redirect($this, 'view');
1415  }
1416 
1417  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
1418  $draft = new ilWebLinkDraftItem(
1419  $item->isInternal(),
1420  $item->getTitle(),
1421  $item->getDescription(),
1422  $item->getTarget(),
1423  false,
1424  $item->getParameters()
1425  );
1426 
1427  $this->tpl->setOnScreenMessage(
1428  'success',
1429  $this->lng->txt('webr_inactive_success'),
1430  true
1431  );
1432  $this->ctrl->redirect($this, 'view');
1433  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
Draft class for creating and updating a Web Link item.
+ Here is the call graph for this function:

◆ deleteLinks()

ilObjLinkResourceGUI::deleteLinks ( )
protected

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

References ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

1371  : void
1372  {
1373  $this->checkPermission('write');
1374 
1375  $link_ids = [];
1376  if ($this->http->wrapper()->post()->has('link_ids')) {
1377  $link_ids = $this->http->wrapper()->post()->retrieve(
1378  'link_ids',
1379  $this->refinery->kindlyTo()->dictOf(
1380  $this->refinery->kindlyTo()->int()
1381  )
1382  );
1383  }
1384 
1385  foreach ($link_ids as $link_id) {
1386  $this->getWebLinkRepo()->deleteItemByLinkID($link_id);
1387  }
1388 
1389  $this->tpl->setOnScreenMessage(
1390  'success',
1391  $this->lng->txt('webr_deleted_items'),
1392  true
1393  );
1394  $this->ctrl->redirect($this, 'view');
1395  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ deleteParameter()

ilObjLinkResourceGUI::deleteParameter ( )
protected

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

References ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

592  : void
593  {
594  $this->checkPermission('write');
595 
596  $link_id = $this->http->wrapper()->query()->retrieve(
597  'link_id',
598  $this->refinery->kindlyTo()->int()
599  );
600  $this->ctrl->setParameter($this, 'link_id', $link_id);
601 
602  $param_id = $this->http->wrapper()->query()->retrieve(
603  'param_id',
604  $this->refinery->kindlyTo()->int()
605  );
606 
607  if (!$param_id) {
608  $this->tpl->setOnScreenMessage(
609  'failure',
610  $this->lng->txt('select_one'),
611  true
612  );
613  $this->ctrl->redirect($this, 'view');
614  }
615 
616  $this->getWebLinkRepo()->deleteParameterByLinkIdAndParamId($link_id, $param_id);
617 
618  $this->tpl->setOnScreenMessage(
619  'success',
620  $this->lng->txt(
621  'links_parameter_deleted'
622  ),
623  true
624  );
625  $this->ctrl->redirect($this, 'editLinks');
626  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ deleteParameterForm()

ilObjLinkResourceGUI::deleteParameterForm ( )
protected

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

References ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

628  : void
629  {
630  $this->checkPermission('write');
631 
632  $link_id = $this->http->wrapper()->query()->retrieve(
633  'link_id',
634  $this->refinery->kindlyTo()->int()
635  );
636 
637  $param_id = $this->http->wrapper()->query()->retrieve(
638  'param_id',
639  $this->refinery->kindlyTo()->int()
640  );
641  if (!$param_id) {
642  $this->tpl->setOnScreenMessage(
643  'failure',
644  $this->lng->txt('select_one'),
645  true
646  );
647  $this->ctrl->redirect($this, 'view');
648  }
649 
650  $this->getWebLinkRepo()->deleteParameterByLinkIdAndParamId($link_id, $param_id);
651 
652  $this->tpl->setOnScreenMessage(
653  'success',
654  $this->lng->txt(
655  'links_parameter_deleted'
656  ),
657  true
658  );
659  $this->ctrl->redirect($this, 'view');
660  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editLink()

ilObjLinkResourceGUI::editLink ( )

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

References activateTabs(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ILIAS\FileDelivery\http(), initFormLink(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and setValuesFromLink().

400  : void
401  {
402  $this->checkPermission('write');
403  $this->activateTabs('content', 'id_content_view');
404 
405  $link_id = 0;
406  if ($this->http->wrapper()->query()->has('link_id')) {
407  $link_id = $this->http->wrapper()->query()->retrieve(
408  'link_id',
409  $this->refinery->kindlyTo()->int()
410  );
411  }
412  if (!$link_id) {
413  $this->tpl->setOnScreenMessage(
414  'failure',
415  $this->lng->txt('select_one'),
416  true
417  );
418  $this->ctrl->redirect($this, 'view');
419  }
420  $form = $this->initFormLink(self::LINK_MOD_EDIT);
421  $this->setValuesFromLink($link_id);
422  $this->tpl->setContent($form->getHTML());
423  }
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editLinks()

ilObjLinkResourceGUI::editLinks ( )
protected

Start with manage mode.

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

References switchViewMode().

1155  : void
1156  {
1157  $this->switchViewMode(self::VIEW_MODE_MANAGE);
1158  }
switchViewMode(?int $force_view_mode=null)
Switch between "View" "Manage" and "Sort".
+ Here is the call graph for this function:

◆ executeCommand()

ilObjLinkResourceGUI::executeCommand ( )

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

References __prepareOutput(), ilObjectGUI\addHeaderAction(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObject2GUI\getCreationMode(), ilObject2GUI\getIdType(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ILIAS\FileDelivery\http(), infoScreenForward(), initFormLink(), initViewMode(), ILIAS\Repository\lng(), ilObject2GUI\prepareOutput(), ILIAS\Repository\refinery(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

90  : void
91  {
92  $this->initViewMode();
93 
94  $base_class = $this->http->wrapper()->query()->retrieve(
95  'baseClass',
96  $this->refinery->kindlyTo()->string()
97  );
98  if ($base_class === ilLinkResourceHandlerGUI::class) {
99  $this->__prepareOutput();
100  }
101  $next_class = $this->ctrl->getNextClass($this);
102  $cmd = $this->ctrl->getCmd();
103  switch ($next_class) {
104  case "ilinfoscreengui":
105  $this->prepareOutput();
106  $this->infoScreenForward(); // forwards command
107  break;
108 
109  case 'ilobjectmetadatagui':
110  $this->checkPermission('write'); // #18563
111  $this->prepareOutput();
112  $this->tabs_gui->activateTab('id_meta_data');
113  $md_gui = new ilObjectMetaDataGUI($this->object);
114  $this->ctrl->forwardCommand($md_gui);
115  break;
116 
117  case 'ilpermissiongui':
118  $this->prepareOutput();
119  $this->tabs_gui->activateTab('id_permissions');
120  $perm_gui = new ilPermissionGUI($this);
121  $this->ctrl->forwardCommand($perm_gui);
122  break;
123 
124  case 'ilobjectcopygui':
125  $this->prepareOutput();
126  $cp = new ilObjectCopyGUI($this);
127  $cp->setType('webr');
128  $this->ctrl->forwardCommand($cp);
129  break;
130 
131  case 'ilexportgui':
132  $this->prepareOutput();
133  $this->tabs_gui->setTabActive('export');
134  $exp = new ilExportGUI($this);
135  $this->ctrl->forwardCommand($exp);
136  break;
137 
138  case "ilcommonactiondispatchergui":
139  $this->prepareOutput();
141  $this->ctrl->forwardCommand($gui);
142  break;
143 
144  case "ilpropertyformgui":
145  $mode = $this->ctrl->isAsynch() ?
146  self::LINK_MOD_ASYNC : self::LINK_MOD_EDIT;
147  $this->initFormLink($mode);
148  $this->ctrl->forwardCommand($this->form);
149  break;
150 
151  case "ilinternallinkgui":
152  $this->lng->loadLanguageModule("content");
153  $link_gui = new ilInternalLinkGUI("RepositoryItem", 0);
154  $link_gui->filterLinkType("PageObject");
155  $link_gui->filterLinkType("GlossaryItem");
156  $link_gui->filterLinkType("RepositoryItem");
157  $link_gui->setFilterWhiteList(true);
158  $this->ctrl->forwardCommand($link_gui);
159  break;
160 
161  default:
162  if ($this->getIdType() === ilObject2GUI::WORKSPACE_OBJECT_ID) {
163  parent::executeCommand();
164  break;
165  }
166  if (!$cmd) {
167  $cmd = 'view';
168  }
169  $this->prepareOutput();
170  $this->$cmd();
171  }
172 
173  if (!$this->getCreationMode()) {
174  $this->addHeaderAction();
175  }
176  }
Class ilObjectMetaDataGUI.
GUI class for the workflow of copying objects.
prepareOutput(bool $show_sub_objects=true)
Internal link selector.
infoScreenForward()
show information screen
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
addHeaderAction()
Add header action menu.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
initViewMode(?int $new_view_mode=null)
+ Here is the call graph for this function:

◆ exportHTML()

ilObjLinkResourceGUI::exportHTML ( )

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

References ilObject2GUI\$tpl, ilUtil\deliverData(), ILIAS\UICore\GlobalTemplate\get(), getWebLinkRepo(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), settings(), and ILIAS\UICore\GlobalTemplate\setVariable().

1660  : void
1661  {
1662  $tpl = new ilTemplate(
1663  "tpl.export_html.html",
1664  true,
1665  true,
1666  "components/ILIAS/WebResource"
1667  );
1668 
1669  $items = $this->getWebLinkRepo()->getAllItemsAsContainer(true)
1670  ->getItems();
1671  foreach ($items as $item) {
1672  $tpl->setCurrentBlock("link_bl");
1673  $tpl->setVariable("LINK_URL", $item->getResolvedLink(false));
1674  $tpl->setVariable("LINK_TITLE", $item->getTitle());
1675  $tpl->setVariable("LINK_DESC", $item->getDescription() ?? '');
1676  $tpl->setVariable("LINK_CREATE", $item->getCreateDate()
1677  ->format('Y-m-d H-i-s'));
1678  $tpl->setVariable("LINK_UPDATE", $item->getLastUpdate()
1679  ->format('Y-m-d H-i-s'));
1681  }
1682 
1683  $tpl->setVariable("CREATE_DATE", $this->object->getCreateDate());
1684  $tpl->setVariable("LAST_UPDATE", $this->object->getLastUpdateDate());
1685  $tpl->setVariable("TXT_TITLE", $this->object->getTitle());
1686  $tpl->setVariable("TXT_DESC", $this->object->getLongDescription());
1687 
1688  $tpl->setVariable(
1689  "INST_ID",
1690  ($this->settings->get('short_inst_name') != "")
1691  ? $this->settings->get('short_inst_name')
1692  : "ILIAS"
1693  );
1694 
1695  ilUtil::deliverData($tpl->get(), "bookmarks.html");
1696  }
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
+ Here is the call graph for this function:

◆ getLinkToListModal()

ilObjLinkResourceGUI::getLinkToListModal ( )

Get form to transform a single weblink to a weblink list.

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

References $DIC, Vendor\Package\$f, ilObjectGUI\$id, $r, ILIAS\Repository\form(), ILIAS\FileDelivery\http(), initFormLink(), ILIAS\Repository\lng(), null, ILIAS\Repository\refinery(), and ILIAS\UI\Implementation\Component\withOnLoadCode().

Referenced by showToolbar().

478  {
479  global $DIC;
480 
481  $f = $DIC->ui()->factory();
482  $r = $DIC->ui()->renderer();
483 
484  // check if form was already set
485  if ($this->form == null) {
486  $this->initFormLink(self::LINK_MOD_SET_LIST);
487  }
488 
489  $form_id = 'form_' . $this->form->getId();
490 
491  $submit = $f->button()->primary($this->lng->txt('save'), '#')
492  ->withOnLoadCode(
493  function ($id) use ($form_id) {
494  return "$('#{$id}').click(function() { $('#{$form_id}').submit(); return false; });";
495  }
496  );
497  $info = $f->messageBox()->info($this->lng->txt('webr_new_list_info'));
498 
499  $modal = $f->modal()->roundtrip(
500  $this->lng->txt('webr_new_list'),
501  $f->legacy()->content($r->render($info) . $this->form->getHTML())
502  )
503  ->withActionButtons([$submit]);
504 
505  $submit = '';
506  if ($this->http->wrapper()->post()->has('sbmt')) {
507  $submit = $this->http->wrapper()->post()->retrieve(
508  'sbmt',
509  $this->refinery->kindlyTo()->string()
510  );
511  }
512  // modal triggers its show signal on load if form validation failed
513  if ($submit === 'submit') {
514  $modal = $modal->withOnLoad($modal->getShowSignal());
515  }
516  return $modal;
517  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
form( $class_path, string $cmd, string $submit_caption="")
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getType()

ilObjLinkResourceGUI::getType ( )

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

72  : string
73  {
74  return "webr";
75  }

◆ getWebLinkRepo()

◆ infoScreen()

ilObjLinkResourceGUI::infoScreen ( )

instead of redirecting here, links to the info screen should directly lead to the right place, but it looks like this needs some restructuring.

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

References ILIAS\Repository\ctrl().

1440  : void
1441  {
1442  $this->ctrl->redirectByClass(
1443  [self::class, ilInfoScreenGUI::class],
1444  'showSummary'
1445  );
1446  }
+ Here is the call graph for this function:

◆ infoScreenForward()

ilObjLinkResourceGUI::infoScreenForward ( )

show information screen

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

References ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

Referenced by executeCommand().

1451  : void
1452  {
1453  if (!$this->checkPermissionBool('visible')) {
1454  $this->checkPermission('read');
1455  }
1456  $this->tabs_gui->activateTab('id_info');
1457 
1458  $info = new ilInfoScreenGUI($this);
1459 
1460  $info->enablePrivateNotes();
1461 
1462  // standard meta data
1463  $info->addMetaDataSections(
1464  $this->object->getId(),
1465  0,
1466  $this->object->getType()
1467  );
1468 
1469  // forward the command
1470  $this->ctrl->forwardCommand($info);
1471  }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjLinkResourceGUI::initCreateForm ( string  $new_type)
protected

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

References $form, and initFormLink().

Referenced by saveObject().

179  {
180  $this->initFormLink(self::LINK_MOD_CREATE);
181  return $this->form;
182  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormLink()

ilObjLinkResourceGUI::initFormLink ( int  $a_mode)
protected

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

References $form, $param, $params, addLinkInputToForm(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilTextAreaInputGUI\setRows(), settings(), ilWebLinkBaseParameter\VALUES, and ilWebLinkBaseParameter\VALUES_TEXT.

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

898  {
899  $this->tabs_gui->activateTab("id_content");
900 
901  $this->form = new ilPropertyFormGUI();
902  switch ($a_mode) {
903  case self::LINK_MOD_CREATE:
904  // Header
905  $this->ctrl->setParameter($this, 'new_type', 'webr');
906  $this->form->setTitle($this->lng->txt('webr_new_link'));
907  $this->form->setTableWidth('600px');
908 
909  // Buttons
910  $this->form->addCommandButton(
911  'save',
912  $this->lng->txt('webr_add')
913  );
914  $this->form->addCommandButton(
915  'cancel',
916  $this->lng->txt('cancel')
917  );
918  break;
919 
920  case self::LINK_MOD_ADD:
921  // Header
922  $this->form->setTitle($this->lng->txt('webr_new_link'));
923 
924  // Buttons
925  $this->form->addCommandButton(
926  'saveAddLink',
927  $this->lng->txt('webr_add')
928  );
929  $this->form->addCommandButton(
930  'view',
931  $this->lng->txt('cancel')
932  );
933  break;
934 
935  case self::LINK_MOD_EDIT:
936  // Header
937  $this->ctrl->setParameter(
938  $this,
939  'link_id',
940  // TODO PHP8 Review: Remove/Replace SuperGlobals
941  (int) $_REQUEST['link_id']
942  );
943  $this->form->setTitle($this->lng->txt('webr_edit'));
944 
945  // Buttons
946  $this->form->addCommandButton(
947  'updateLink',
948  $this->lng->txt('save')
949  );
950  $this->form->addCommandButton(
951  'view',
952  $this->lng->txt('cancel')
953  );
954  break;
955 
956  /*
957  * The async call for displaying the object explorer for
958  * internal links goes through ilPropertyFormGUI to get
959  * to the right ilLinkInputGUI, so we only add that field
960  * to the form here.
961  */
962  case self::LINK_MOD_ASYNC:
963  $this->addLinkInputToForm($a_mode);
964  return $this->form;
965  }
966 
967  if ($a_mode == self::LINK_MOD_SET_LIST) {
968  $this->form->setValuesByPost();
969  $this->form->setFormAction(
970  $this->ctrl->getFormAction($this, 'saveLinkList')
971  );
972  $this->form->setId(uniqid('form'));
973 
974  // List Title
975  $title = new ilTextInputGUI(
976  $this->lng->txt('webr_list_title'),
977  'lti'
978  );
979  $title->setRequired(true);
980  $title->setSize(40);
981  $title->setMaxLength(127);
982  $this->form->addItem($title);
983 
984  // List Description
985  $desc = new ilTextAreaInputGUI(
986  $this->lng->txt('webr_list_desc'),
987  'tde'
988  );
989  $desc->setRows(3);
990  $desc->setCols(40);
991  $this->form->addItem($desc);
992 
993  $item = new ilHiddenInputGUI('sbmt');
994  $item->setValue('submit');
995  $this->form->addItem($item);
996  } else {
997  $this->form->setFormAction($this->ctrl->getFormAction($this));
998 
999  $this->addLinkInputToForm($a_mode);
1000 
1001  // Title
1002  $tit = new ilTextInputGUI(
1003  $this->lng->txt('webr_link_title'),
1004  'title'
1005  );
1006  $tit->setRequired(true);
1007  $tit->setSize(40);
1008  $tit->setMaxLength(127);
1009  $this->form->addItem($tit);
1010 
1011  // Description
1012  $des = new ilTextAreaInputGUI(
1013  $this->lng->txt('description'),
1014  'desc'
1015  );
1016  $des->setRows(3);
1017  $des->setCols(40);
1018  $this->form->addItem($des);
1019 
1020  if ($a_mode != self::LINK_MOD_CREATE) {
1021  // Active
1022  $act = new ilCheckboxInputGUI($this->lng->txt('active'), 'act');
1023  $act->setChecked(true);
1024  $act->setValue('1');
1025  $this->form->addItem($act);
1026  }
1027 
1028  if ($this->settings->get('links_dynamic') &&
1029  $a_mode != self::LINK_MOD_CREATE
1030  ) {
1031  $dyn = new ilNonEditableValueGUI(
1032  $this->lng->txt('links_dyn_parameter')
1033  );
1034  $dyn->setInfo($this->lng->txt('links_dynamic_info'));
1035 
1036  if ($this->http->wrapper()->query()->has('link_id')) {
1037  $link_id = $this->http->wrapper()->query()->retrieve(
1038  'link_id',
1039  $this->refinery->kindlyTo()->int()
1040  );
1041  }
1042  if (
1043  isset($link_id) &&
1044  $link_id > 0 &&
1045  ($params = $this->getWebLinkRepo()->getItemByLinkId($link_id)->getParameters()) !== []
1046  ) {
1047  $ex = new ilCustomInputGUI(
1048  $this->lng->txt('links_existing_params'),
1049  'ex'
1050  );
1051  $dyn->addSubItem($ex);
1052 
1053  foreach ($params as $param) {
1054  $p = new ilCustomInputGUI();
1055 
1056  $ptpl = new ilTemplate(
1057  'tpl.link_dyn_param_edit.html',
1058  true,
1059  true,
1060  'components/ILIAS/WebResource'
1061  );
1062  $ptpl->setVariable(
1063  'INFO_TXT',
1064  $param->getInfo()
1065  );
1066  $this->ctrl->setParameter($this, 'param_id', $param->getParamId());
1067  $this->ctrl->setParameter($this, 'link_id', $link_id);
1068  $ptpl->setVariable(
1069  'LINK_DEL',
1070  $this->ctrl->getLinkTarget(
1071  $this,
1072  'deleteParameterForm'
1073  )
1074  );
1075  $ptpl->setVariable(
1076  'LINK_TXT',
1077  $this->lng->txt('delete')
1078  );
1079  $p->setHtml($ptpl->get());
1080  $dyn->addSubItem($p);
1081  }
1082  }
1083 
1084  // Dynyamic name
1085  $nam = new ilTextInputGUI($this->lng->txt('links_name'), 'nam');
1086  $nam->setSize(12);
1087  $nam->setMaxLength(128);
1088  $dyn->addSubItem($nam);
1089 
1090  // Dynamic value
1091  $val = new ilSelectInputGUI(
1092  $this->lng->txt('links_value'),
1093  'val'
1094  );
1095  $options = [];
1096  foreach (ilWebLinkBaseParameter::VALUES as $name => $identifier) {
1097  $options[$identifier] = $this->lng->txt(ilWebLinkBaseParameter::VALUES_TEXT[$identifier]);
1098  }
1099  $val->setOptions($options);
1100  $val->setValue(0);
1101  $dyn->addSubItem($val);
1102 
1103  $this->form->addItem($dyn);
1104  }
1105  }
1106  return $this->form;
1107  }
This class represents a selection list property in a property form.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
const array VALUES_TEXT
Keys of the language variables to the possible values, e.g.
This class represents a hidden form property in a property form.
static http()
Fetches the global http state from ILIAS.
const array VALUES
TODO Once the GUI is updated, undefined can be dropped.
$param
Definition: xapitoken.php:46
form( $class_path, string $cmd, string $submit_caption="")
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormSettings()

ilObjLinkResourceGUI::initFormSettings ( )
protected

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

References $form, ILIAS\UI\Implementation\Component\Input\$inputs, ilContainerSortingSettings\_lookupSortMode(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by settings().

331  : StandardForm
332  {
333  $inputs = [];
334  $obj_props = $this->object->getObjectProperties();
335  $field_factory = $this->ui_factory->input()->field();
336 
337  if ($this->getWebLinkRepo()->doesListExist()) {
338  $title_and_description = $obj_props->getPropertyTitleAndDescription()->toForm(
339  $this->lng,
340  $field_factory,
341  $this->refinery
342  );
343  $inputs['general'] = $field_factory->section(
344  ['title_and_description' => $title_and_description],
345  $this->lng->txt('webr_edit_settings')
346  );
347  }
348 
349  // activation
350  $this->lng->loadLanguageModule('rep');
351  $is_online = $obj_props->getPropertyIsOnline()->toForm(
352  $this->lng,
353  $field_factory,
354  $this->refinery
355  );
356  $inputs['activation'] = $field_factory->section(
357  ['is_online' => $is_online],
358  $this->lng->txt('rep_activation_availability')
359  );
360 
361  $presentation_inputs = [];
362 
363  // tile image
364  $tile_input = $obj_props->getPropertyTileImage()->toForm(
365  $this->lng,
366  $field_factory,
367  $this->refinery
368  );
369  $presentation_inputs['tile_image'] = $tile_input;
370 
371  // Sorting
372  if ($this->getWebLinkRepo()->doesListExist()) {
373  $current_mode = (string) ilContainerSortingSettings::_lookupSortMode($this->object->getId());
374  $order_input = $field_factory->radio($this->lng->txt('webr_sorting'))
375  ->withOption(
376  (string) ilContainer::SORT_TITLE,
377  $this->lng->txt('webr_sorting')
378  )
379  ->withOption(
380  (string) ilContainer::SORT_MANUAL,
381  $this->lng->txt('webr_sort_manual')
382  )
383  ->withValue($current_mode)
384  ->withRequired(true);
385  $presentation_inputs['sor'] = $order_input;
386  }
387 
388  $inputs['presentation'] = $field_factory->section(
389  $presentation_inputs,
390  $this->lng->txt('obj_presentation')
391  );
392 
393  $form = $this->ui_factory->input()->container()->form()->standard(
394  $this->ctrl->getFormAction($this, 'saveSettings'),
395  $inputs
396  );
397  return $form;
398  }
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:61
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initList()

ilObjLinkResourceGUI::initList ( int  $a_mode)
protected

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

References ILIAS\Repository\form().

Referenced by save(), and saveLinkList().

820  : void
821  {
822  if ($a_mode == self::LINK_MOD_CREATE) {
823  $this->draft_list = new ilWebLinkDraftList(
824  $this->form->getInput('title'),
825  $this->form->getInput('desc')
826  );
827  }
828 
829  if ($a_mode == self::LINK_MOD_SET_LIST) {
830  $this->draft_list = new ilWebLinkDraftList(
831  $this->form->getInput('lti'),
832  $this->form->getInput('tde')
833  );
834  }
835  }
form( $class_path, string $cmd, string $submit_caption="")
Draft class for creating or updating a Web Link list.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initViewMode()

ilObjLinkResourceGUI::initViewMode ( ?int  $new_view_mode = null)
protected
Todo:
no view mode for workspace?

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

References ilSession\get(), ilSession\has(), ILIAS\Repository\int(), null, and ilSession\set().

Referenced by executeCommand(), and switchViewMode().

80  : void
81  {
82  if ($new_view_mode !== null) {
83  ilSession::set('webr_view_mode', $new_view_mode);
84  }
85  if (ilSession::has('webr_view_mode')) {
86  $this->view_mode = (int) ilSession::get('webr_view_mode');
87  }
88  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static has($a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manage()

ilObjLinkResourceGUI::manage ( )
protected

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

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

Referenced by view().

1200  : void
1201  {
1202  $this->checkPermission('write');
1203  $this->activateTabs('content', 'id_content_manage');
1204 
1205  $this->tpl->addBlockFile(
1206  'ADM_CONTENT',
1207  'adm_content',
1208  'tpl.webr_manage.html',
1209  'components/ILIAS/WebResource'
1210  );
1211  $this->showToolbar('ACTION_BUTTONS');
1212 
1213  $table = new ilWebResourceEditableLinkTableGUI($this, 'view');
1214  $table->parse();
1215 
1217 
1218  $this->tpl->addJavaScript("assets/js/intLink.js");
1219  $this->tpl->addJavascript("assets/js/Form.js");
1220 
1221  $this->tpl->setVariable('TABLE_LINKS', $table->getHTML() . $js);
1222  }
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing.
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToLink()

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

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

References ilChangeEvent\_recordReadEvent(), ilUtil\redirect(), and ILIAS\Repository\user().

Referenced by callDirectLink(), and callLink().

1648  : void {
1649  if ($a_url) {
1651  "webr",
1652  $a_ref_id,
1653  $a_obj_id,
1654  $this->user->getId()
1655  );
1656  ilUtil::redirect($a_url);
1657  }
1658  }
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static redirect(string $a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilObjLinkResourceGUI::save ( )

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

References $valid, checkLinkInput(), ILIAS\Repository\form(), initFormLink(), initList(), ILIAS\Repository\lng(), and saveObject().

184  : void
185  {
186  $this->initFormLink(self::LINK_MOD_CREATE);
187  $valid = $this->form->checkInput();
188  if (
189  $this->checkLinkInput(self::LINK_MOD_CREATE, $valid, 0) &&
190  $this->form->getInput('tar_mode_type') === 'single'
191  ) {
192  $this->saveObject();
193  } elseif ($valid && $this->form->getInput('tar_mode_type') == 'list') {
194  $this->initList(self::LINK_MOD_CREATE);
195  $this->saveObject();
196  } else {
197  // Data incomplete or invalid
198  $this->tpl->setOnScreenMessage(
199  'failure',
200  $this->lng->txt('err_check_input')
201  );
202  $this->form->setValuesByPost();
203  $this->tpl->setContent($this->form->getHTML());
204  }
205  }
$valid
checkLinkInput(int $a_mode, bool $a_valid, ?int $a_link_id=null)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveAddLink()

ilObjLinkResourceGUI::saveAddLink ( )

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

References $valid, activateTabs(), ilPropertyFormGUI\checkInput(), checkLinkInput(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilPropertyFormGUI\getHTML(), getWebLinkRepo(), initFormLink(), ILIAS\Repository\lng(), null, and settings().

556  : void
557  {
558  $this->checkPermission('write');
559 
560  $form = $this->initFormLink(self::LINK_MOD_ADD);
561  $valid = $form->checkInput();
562  if ($this->checkLinkInput(
563  self::LINK_MOD_ADD,
564  $valid,
565  0
566  )
567  ) {
568  if (
569  $this->settings->get('links_dynamic') &&
570  $this->draft_parameter !== null
571  ) {
572  $this->draft_item->addParameter($this->draft_parameter);
573  }
574  $this->getWebLinkRepo()->createItem($this->draft_item);
575 
576  $this->tpl->setOnScreenMessage(
577  'success',
578  $this->lng->txt('webr_link_added'),
579  true
580  );
581  $this->ctrl->redirect($this, 'view');
582  }
583  $this->tpl->setOnScreenMessage(
584  'failure',
585  $this->lng->txt('err_check_input')
586  );
587  $this->form->setValuesByPost();
588  $this->activateTabs('content', 'id_content_view');
589  $this->tpl->setContent($form->getHTML());
590  }
$valid
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
checkLinkInput(int $a_mode, bool $a_valid, ?int $a_link_id=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveLinkList()

ilObjLinkResourceGUI::saveLinkList ( )

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

References $valid, ilPropertyFormGUI\checkInput(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), getWebLinkRepo(), initFormLink(), initList(), ILIAS\Repository\lng(), ilPropertyFormGUI\setValuesByPost(), and view().

519  : void
520  {
521  $this->checkPermission('write');
522  $form = $this->initFormLink(self::LINK_MOD_SET_LIST);
523  $valid = $form->checkInput();
524  if ($valid) {
525  $this->object->setTitle($form->getInput('lti'));
526  $this->object->setDescription($form->getInput('tde'));
527  $this->object->update();
528 
529  $this->initList(self::LINK_MOD_SET_LIST);
530  $this->getWebLinkRepo()->createList($this->draft_list);
531  $this->tpl->setOnScreenMessage(
532  'success',
533  $this->lng->txt('webr_list_set'),
534  true
535  );
536  $this->ctrl->redirect($this, 'view');
537  }
538  $this->tpl->setOnScreenMessage(
539  'failure',
540  $this->lng->txt('err_check_input'),
541  true
542  );
544  $this->view();
545  }
$valid
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveObject()

ilObjLinkResourceGUI::saveObject ( )

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

References afterSave(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjectGUI\getDidacticTemplateVar(), initCreateForm(), ILIAS\Repository\lng(), and ilObject2GUI\putObjectInTree().

Referenced by save().

207  : void
208  {
209  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
210  if (!$this->checkPermissionBool("create", "", $this->requested_new_type)) {
211  $this->error->raiseError($this->lng->txt("no_create_permission"), $this->error->MESSAGE);
212  }
213 
214  $this->lng->loadLanguageModule($this->requested_new_type);
215  $this->ctrl->setParameter($this, "new_type", $this->requested_new_type);
216 
217  $this->form = $this->initCreateForm($this->requested_new_type);
218  if ($this->form->checkInput()) {
219  $this->ctrl->setParameter($this, "new_type", "");
220 
221  $class_name = "ilObj" . $this->obj_definition->getClassName($this->requested_new_type);
222  $newObj = new $class_name();
223  $newObj->setType($this->requested_new_type);
224  $newObj->setTitle($this->form->getInput("title"));
225  $newObj->setDescription($this->form->getInput("desc"));
226  $newObj->processAutoRating();
227  $newObj->create();
228 
229  $this->putObjectInTree($newObj);
230 
231  if ($this->form->getInput('didactic_template')) {
232  $dtpl = $this->getDidacticTemplateVar("dtpl");
233  // Object calls initCreateForm again in getDidacticTemplateVar
234  $this->form->checkInput();
235  $newObj->applyDidacticTemplate($dtpl);
236  }
237 
238  $this->afterSave($newObj);
239  }
240 
241  $this->form->setValuesByPost();
242  $this->tpl->setContent($this->form->getHTML());
243  }
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
afterSave(ilObject $new_object)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
putObjectInTree(ilObject $obj, ?int $parent_node_id=null)
Add object to tree at given position.
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSorting()

ilObjLinkResourceGUI::saveSorting ( )
protected

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

References ilContainerSorting\_getInstance(), ilObject2GUI\checkPermission(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), and view().

1260  : void
1261  {
1262  $this->checkPermission('write');
1263  $sort = ilContainerSorting::_getInstance($this->object->getId());
1264 
1265  $position = [];
1266  if ($this->http->wrapper()->post()->has('position')) {
1267  $position = $this->http->wrapper()->post()->retrieve(
1268  'position',
1269  $this->refinery->kindlyTo()->dictOf(
1270  $this->refinery->kindlyTo()->string()
1271  )
1272  );
1273  }
1274  $sort->savePost($position);
1275  $this->tpl->setOnScreenMessage(
1276  'success',
1277  $this->lng->txt('settings_saved'),
1278  true
1279  );
1280  $this->view();
1281  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _getInstance(int $a_obj_id)
+ Here is the call graph for this function:

◆ setTabs()

ilObjLinkResourceGUI::setTabs ( )
protected

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

References $DIC, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObject2GUI\getCreationMode(), and ILIAS\Repository\lng().

1529  : void
1530  {
1531  global $DIC;
1532 
1533  $ilHelp = $DIC['ilHelp'];
1534  $ilHelp->setScreenIdComponent("webr");
1535 
1536  if ($this->checkPermissionBool('read')) {
1537  $this->tabs_gui->addTab(
1538  "id_content",
1539  $this->lng->txt("content"),
1540  $this->ctrl->getLinkTarget($this, "view")
1541  );
1542  }
1543 
1544  if (
1545  $this->checkPermissionBool('visible') ||
1546  $this->checkPermissionBool('read')
1547  ) {
1548  $this->tabs_gui->addTab(
1549  "id_info",
1550  $this->lng->txt("info_short"),
1551  $this->ctrl->getLinkTarget($this, "infoScreen")
1552  );
1553  }
1554 
1555  if ($this->checkPermissionBool('write') and !$this->getCreationMode()) {
1556  $this->tabs_gui->addTab(
1557  "id_settings",
1558  $this->lng->txt("settings"),
1559  $this->ctrl->getLinkTarget($this, "settings")
1560  );
1561  }
1562 
1563  if ($this->checkPermissionBool('write')) {
1564  $mdgui = new ilObjectMetaDataGUI($this->object);
1565  $mdtab = $mdgui->getTab();
1566  if ($mdtab) {
1567  $this->tabs_gui->addTab(
1568  "id_meta_data",
1569  $this->lng->txt("meta_data"),
1570  $mdtab
1571  );
1572  }
1573  }
1574 
1575  if ($this->checkPermissionBool('write')) {
1576  $this->tabs_gui->addTab(
1577  'export',
1578  $this->lng->txt('export'),
1579  $this->ctrl->getLinkTargetByClass('ilexportgui', '')
1580  );
1581  }
1582 
1583  // will add permission tab if needed
1584  parent::setTabs();
1585  }
Class ilObjectMetaDataGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ settings()

ilObjLinkResourceGUI::settings ( )
protected

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

References ilObjectGUI\$data, ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), initFormSettings(), ILIAS\Repository\lng(), null, ILIAS\Repository\object(), and ilContainerSortingSettings\setSortMode().

Referenced by __construct(), callLink(), checkLinkInput(), exportHTML(), initFormLink(), saveAddLink(), and updateLink().

279  : void
280  {
281  $this->checkPermission('write');
282  $this->tabs_gui->activateTab('id_settings');
283 
284  $form = $this->initFormSettings();
285  $this->tpl->setContent($this->ui_renderer->render($form));
286  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValuesFromLink()

ilObjLinkResourceGUI::setValuesFromLink ( int  $a_link_id)
protected

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

References ILIAS\Repository\form(), getWebLinkRepo(), and ILIAS\Repository\int().

Referenced by editLink().

807  : void
808  {
809  $item = $this->getWebLinkRepo()->getItemByLinkId($a_link_id);
810  $this->form->setValuesByArray(
811  array(
812  'title' => $item->getTitle(),
813  'tar' => $item->getTarget(),
814  'desc' => $item->getDescription(),
815  'act' => (int) $item->isActive()
816  )
817  );
818  }
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLinks()

ilObjLinkResourceGUI::showLinks ( )
protected

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

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

Referenced by view().

1224  : void
1225  {
1226  $this->checkPermission('read');
1227  $this->activateTabs('content', 'id_content_view');
1228 
1229  $table = new ilWebResourceLinkTableGUI($this, 'showLinks');
1230  $table->parse();
1231 
1232  $this->tpl->addBlockFile(
1233  'ADM_CONTENT',
1234  'adm_content',
1235  'tpl.webr_view.html',
1236  'components/ILIAS/WebResource'
1237  );
1238  $this->showToolbar('ACTION_BUTTONS');
1239  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
1240  }
TableGUI class for search results.
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showToolbar()

ilObjLinkResourceGUI::showToolbar ( string  $a_tpl_var)
protected

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

References $DIC, Vendor\Package\$f, $r, ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), getLinkToListModal(), getWebLinkRepo(), and ILIAS\Repository\lng().

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

1283  : void
1284  {
1285  global $DIC;
1286 
1287  $tool = new ilToolbarGUI();
1288  $tool->setFormAction($this->ctrl->getFormAction($this));
1289 
1290  $f = $DIC->ui()->factory();
1291  $r = $DIC->ui()->renderer();
1292 
1293  if (
1294  $this->getWebLinkRepo()->doesListExist() &&
1295  $this->checkPermissionBool('write')
1296  ) {
1297  $tool->addButton(
1298  $this->lng->txt('webr_add'),
1299  $this->ctrl->getLinkTarget($this, 'addLink')
1300  );
1301  } elseif ($this->checkPermissionBool('write')) {
1302  $modal = $this->getLinkToListModal();
1303  $button = $f->button()->standard(
1304  $this->lng->txt('webr_set_to_list'),
1305  '#'
1306  )
1307  ->withOnClick($modal->getShowSignal());
1308 
1309  $this->tpl->setVariable("MODAL", $r->render([$modal]));
1310 
1311  $tool->addComponent($button);
1312  }
1313 
1314  $download_button = $f->button()->standard(
1315  $this->lng->txt('export_html'),
1316  $this->ctrl->getLinkTarget($this, 'exportHTML')
1317  );
1318  $tool->addComponent($download_button);
1319  $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
1320  }
getLinkToListModal()
Get form to transform a single weblink to a weblink list.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
global $DIC
Definition: shib_login.php:22
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sort()

ilObjLinkResourceGUI::sort ( )
protected

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

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

Referenced by view().

1242  : void
1243  {
1244  $this->checkPermission('write');
1245  $this->activateTabs('content', 'id_content_ordering');
1246 
1247  $table = new ilWebResourceLinkTableGUI($this, 'sort', true);
1248  $table->parse();
1249 
1250  $this->tpl->addBlockFile(
1251  'ADM_CONTENT',
1252  'adm_content',
1253  'tpl.webr_view.html',
1254  'components/ILIAS/WebResource'
1255  );
1256  $this->showToolbar('ACTION_BUTTONS');
1257  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
1258  }
TableGUI class for search results.
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchViewMode()

ilObjLinkResourceGUI::switchViewMode ( ?int  $force_view_mode = null)
protected

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

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

References $view_mode, ILIAS\FileDelivery\http(), initViewMode(), null, ILIAS\Repository\refinery(), and view().

Referenced by editLinks().

1137  : void
1138  {
1139  $new_view_mode = $this->view_mode;
1140  if ($force_view_mode !== null) {
1141  $new_view_mode = $force_view_mode;
1142  } elseif ($this->http->wrapper()->query()->has('switch_mode')) {
1143  $new_view_mode = $this->http->wrapper()->query()->retrieve(
1144  'switch_mode',
1145  $this->refinery->kindlyTo()->int()
1146  );
1147  }
1148  $this->initViewMode($new_view_mode);
1149  $this->view();
1150  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
initViewMode(?int $new_view_mode=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLink()

ilObjLinkResourceGUI::updateLink ( )

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

References $valid, ilPropertyFormGUI\checkInput(), checkLinkInput(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), getWebLinkRepo(), ILIAS\FileDelivery\http(), initFormLink(), ILIAS\Repository\lng(), null, ILIAS\Repository\refinery(), settings(), and ilPropertyFormGUI\setValuesByPost().

425  : void
426  {
427  $form = $this->initFormLink(self::LINK_MOD_EDIT);
428  $valid = $form->checkInput();
429  $link_id = 0;
430  if ($this->http->wrapper()->query()->has('link_id')) {
431  $link_id = $this->http->wrapper()->query()->retrieve(
432  'link_id',
433  $this->refinery->kindlyTo()->int()
434  );
435  }
436  if ($this->checkLinkInput(
437  self::LINK_MOD_EDIT,
438  $valid,
439  $link_id
440  )) {
441  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
442  foreach ($item->getParameters() as $parameter) {
443  $this->draft_item->addParameter($parameter);
444  }
445 
446  if (
447  $this->settings->get('links_dynamic') &&
448  $this->draft_parameter !== null
449  ) {
450  $this->draft_item->addParameter($this->draft_parameter);
451  }
452  $this->getWebLinkRepo()->updateItem($item, $this->draft_item);
453 
454  if (!$this->getWebLinkRepo()->doesListExist()) {
455  $this->object->setTitle($form->getInput('title'));
456  $this->object->setDescription($form->getInput('desc'));
457  $this->object->update();
458  }
459  $this->tpl->setOnScreenMessage(
460  'success',
461  $this->lng->txt('settings_saved'),
462  true
463  );
464  $this->ctrl->redirect($this, 'view');
465  }
466  $this->tpl->setOnScreenMessage(
467  'failure',
468  $this->lng->txt('err_check_input')
469  );
471  $this->tpl->setContent($form->getHTML());
472  }
$valid
checkLinkInput(int $a_mode, bool $a_valid, ?int $a_link_id=null)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ updateLinks()

ilObjLinkResourceGUI::updateLinks ( )
protected

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

References ilObjectGUI\$data, $param, activateTabs(), ilObject2GUI\checkPermission(), ILIAS\Repository\ctrl(), getWebLinkRepo(), ILIAS\FileDelivery\http(), ilLinkInputGUI\isInternalLink(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ilUtil\stripSlashes().

662  : void
663  {
664  $this->checkPermission('write');
665  $this->activateTabs('content', '');
666 
667  $ids = [];
668  if ($this->http->wrapper()->post()->has('ids')) {
669  $ids = $this->http->wrapper()->post()->retrieve(
670  'ids',
671  $this->refinery->kindlyTo()->dictOf(
672  $this->refinery->kindlyTo()->int()
673  )
674  );
675  }
676 
677  if ($ids === []) {
678  $this->tpl->setOnScreenMessage(
679  'failure',
680  $this->lng->txt('select_one'),
681  true
682  );
683  $this->ctrl->redirect($this, 'view');
684  }
685 
686  $link_post = (array) ($this->http->request()->getParsedBody(
687  )['links'] ?? []);
688 
689  // Validate
690  $invalid = [];
691  foreach ($ids as $link_id) {
692  $data = $link_post[$link_id];
693 
694  if (
695  $this->http->wrapper()->post()->has(
696  'tar_' . $link_id . '_ajax_type'
697  ) &&
698  $this->http->wrapper()->post()->has(
699  'tar_' . $link_id . '_ajax_id'
700  )
701  ) {
702  $data['tar'] =
703  $this->http->wrapper()->post()->retrieve(
704  'tar_' . $link_id . '_ajax_type',
705  $this->refinery->kindlyTo()->string()
706  ) . '|' .
707  $this->http->wrapper()->post()->retrieve(
708  'tar_' . $link_id . '_ajax_id',
709  $this->refinery->kindlyTo()->string()
710  );
711  }
712  if (!strlen($data['title'] ?? '')) {
713  $invalid[] = $link_id;
714  continue;
715  }
716  if (!strlen($data['tar'] ?? '')) {
717  $invalid[] = $link_id;
718  continue;
719  }
720  if (($data['nam'] ?? false) && !($data['val'] ?? false)) {
721  $invalid[] = $link_id;
722  continue;
723  }
724  if (!($data['nam'] ?? false) && ($data['val'] ?? false)) {
725  $invalid[] = $link_id;
726  }
727  }
728 
729  if ($invalid !== []) {
730  $this->tpl->setOnScreenMessage(
731  'failure',
732  $this->lng->txt('err_check_input')
733  );
734  $this->tpl->addBlockFile(
735  'ADM_CONTENT',
736  'adm_content',
737  'tpl.webr_manage.html',
738  'components/ILIAS/WebResource'
739  );
740  $table = new ilWebResourceEditableLinkTableGUI($this, 'view');
741  $table->setInvalidLinks($invalid);
742  $table->parseSelectedLinks($ids);
743  $table->updateFromPost();
744  $this->tpl->setVariable('TABLE_LINKS', $table->getHTML());
745  return;
746  }
747 
748  // Save Settings
749  foreach ($ids as $link_id) {
750  $data = $link_post[$link_id];
751 
752  if (
753  $this->http->wrapper()->post()->has(
754  'tar_' . $link_id . '_ajax_type'
755  ) &&
756  $this->http->wrapper()->post()->has(
757  'tar_' . $link_id . '_ajax_id'
758  )
759  ) {
760  $data['tar'] =
761  $this->http->wrapper()->post()->retrieve(
762  'tar_' . $link_id . '_ajax_type',
763  $this->refinery->kindlyTo()->string()
764  ) . '|' .
765  $this->http->wrapper()->post()->retrieve(
766  'tar_' . $link_id . '_ajax_id',
767  $this->refinery->kindlyTo()->string()
768  );
769  }
770 
771  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
772  $draft = new ilWebLinkDraftItem(
774  ilUtil::stripSlashes($data['title'] ?? ''),
775  ilUtil::stripSlashes($data['desc'] ?? ''),
776  str_replace('"', '', ilUtil::stripSlashes($data['tar'] ?? '')),
777  (bool) ($data['act'] ?? false),
778  $item->getParameters()
779  );
780 
781  if (strlen($data['nam'] ?? '') && $data['val'] ?? '') {
783  (int) ($data['val'] ?? 0),
784  ilUtil::stripSlashes($data['nam'] ?? '')
785  );
786  $draft->addParameter($param);
787  }
788 
789  $this->getWebLinkRepo()->updateItem($item, $draft);
790 
791  if (!$this->getWebLinkRepo()->doesListExist()) {
792  $this->object->setTitle(ilUtil::stripSlashes($data['title'] ?? ''));
793  $this->object->setDescription(
794  ilUtil::stripSlashes($data['desc'] ?? '')
795  );
796  $this->object->update();
797  }
798  }
799  $this->tpl->setOnScreenMessage(
800  'success',
801  $this->lng->txt('settings_saved'),
802  true
803  );
804  $this->ctrl->redirect($this, 'view');
805  }
Draft class for creating and updating a parameter attached to Web Link items.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
static http()
Fetches the global http state from ILIAS.
$param
Definition: xapitoken.php:46
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static isInternalLink(string $a_value)
Draft class for creating and updating a Web Link item.
+ Here is the call graph for this function:

◆ view()

ilObjLinkResourceGUI::view ( )

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

References ilContainerSortingSettings\_lookupSortMode(), ilObject2GUI\checkPermission(), ILIAS\FileDelivery\http(), manage(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), showLinks(), sort(), and ilContainer\SORT_MANUAL.

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

1160  : void
1161  {
1162  $this->tabs_gui->activateTab("id_content");
1163  $this->checkPermission('read');
1164 
1165  $base_class = $this->http->wrapper()->query()->retrieve(
1166  'baseClass',
1167  $this->refinery->kindlyTo()->string()
1168  );
1169  if (strcasecmp($base_class, ilAdministrationGUI::class) === 0) {
1170  parent::view();
1171  return;
1172  } else {
1173  switch ($this->view_mode) {
1174  case self::VIEW_MODE_MANAGE:
1175  $this->manage();
1176  break;
1177 
1178  case self::VIEW_MODE_SORT:
1179  // #14638
1181  $this->object->getId()
1182  ) == ilContainer::SORT_MANUAL) {
1183  $this->sort();
1184  break;
1185  }
1186  $this->showLinks();
1187  break;
1188 
1189  default:
1190  $this->showLinks();
1191  break;
1192  }
1193  }
1194  $this->tpl->setPermanentLink(
1195  $this->object->getType(),
1196  $this->object->getRefId()
1197  );
1198  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $draft_item

ilWebLinkDraftItem ilObjLinkResourceGUI::$draft_item = null
private

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

◆ $draft_list

ilWebLinkDraftList ilObjLinkResourceGUI::$draft_list = null
private

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

◆ $draft_parameter

ilWebLinkDraftParameter ilObjLinkResourceGUI::$draft_parameter = null
private

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

◆ $form

ilPropertyFormGUI ilObjLinkResourceGUI::$form = null
private

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

Referenced by initCreateForm(), initFormLink(), and initFormSettings().

◆ $http

HTTPService ilObjLinkResourceGUI::$http
protected

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

◆ $view_mode

int ilObjLinkResourceGUI::$view_mode = self::VIEW_MODE_VIEW
private

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

Referenced by switchViewMode().

◆ LINK_MOD_ADD

const int ilObjLinkResourceGUI::LINK_MOD_ADD = 3
protected

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

◆ LINK_MOD_ASYNC

const int ilObjLinkResourceGUI::LINK_MOD_ASYNC = 6
protected

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

◆ LINK_MOD_CREATE

const int ilObjLinkResourceGUI::LINK_MOD_CREATE = 1
protected

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

◆ LINK_MOD_EDIT

const int ilObjLinkResourceGUI::LINK_MOD_EDIT = 2
protected

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

◆ LINK_MOD_SET_LIST

const int ilObjLinkResourceGUI::LINK_MOD_SET_LIST = 4
protected

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

◆ VIEW_MODE_MANAGE

const int ilObjLinkResourceGUI::VIEW_MODE_MANAGE = 2
protected

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

◆ VIEW_MODE_SORT

const int ilObjLinkResourceGUI::VIEW_MODE_SORT = 3
protected

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

◆ VIEW_MODE_VIEW

const int ilObjLinkResourceGUI::VIEW_MODE_VIEW = 1
protected

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


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