ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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...
 
 history ()
 
 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 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
 
const LINK_MOD_SET_LIST = 4
 
const LINK_MOD_ASYNC = 6
 
HTTPService $http
 
ilNavigationHistory $navigationHistory
 
- 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 54 of file class.ilObjLinkResourceGUI.php.

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

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

Member Function Documentation

◆ __prepareOutput()

ilObjLinkResourceGUI::__prepareOutput ( )
private

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

Referenced by executeCommand().

1612  : void
1613  {
1614  $this->tpl->setLocator();
1615  }
+ Here is the caller graph for this function:

◆ _goto()

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

Definition at line 1723 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().

1723  : void
1724  {
1725  global $DIC;
1726 
1727  $main_tpl = $DIC->ui()->mainTemplate();
1728  $ilAccess = $DIC->access();
1729  $lng = $DIC->language();
1730  $ctrl = $DIC->ctrl();
1731  $ilErr = $DIC['ilErr'];
1732 
1733  if ($a_additional && substr($a_additional, -3) == "wsp") {
1734  $ctrl->setTargetScript('ilias.php');
1736  ilSharedResourceGUI::class,
1737  'wsp_id',
1738  $a_target
1739  );
1741  [
1742  ilSharedResourceGUI::class
1743  ],
1744  'edit'
1745  );
1746  return;
1747  }
1748 
1749  // Will be replaced in future releases by ilAccess::checkAccess()
1750  if ($ilAccess->checkAccess("read", "", (int) $a_target)) {
1752  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target
1753  );
1754  } elseif ($ilAccess->checkAccess("visible", "", (int) $a_target)) {
1756  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" . $a_target . "&cmd=infoScreen"
1757  );
1758  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1759  $main_tpl->setOnScreenMessage(
1760  'failure',
1761  sprintf(
1762  $lng->txt("msg_no_perm_read_item"),
1765  (int) $a_target
1766  )
1767  )
1768  ),
1769  true
1770  );
1772  }
1773 
1774  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1775  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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)
$ilErr
Definition: raiseError.php:17
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:25
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 1493 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().

1496  : void {
1497  switch ($a_active_tab) {
1498  case 'content':
1499  if ($this->checkPermissionBool('write')) {
1500  $this->lng->loadLanguageModule('cntr');
1501 
1502  $this->ctrl->setParameter(
1503  $this,
1504  'switch_mode',
1505  self::VIEW_MODE_VIEW
1506  );
1507  $this->tabs_gui->addSubTab(
1508  'id_content_view',
1509  $this->lng->txt('view'),
1510  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1511  );
1512  $this->ctrl->setParameter(
1513  $this,
1514  'switch_mode',
1515  self::VIEW_MODE_MANAGE
1516  );
1517  $this->tabs_gui->addSubTab(
1518  'id_content_manage',
1519  $this->lng->txt('cntr_manage'),
1520  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1521  );
1522  if (!$this->getWebLinkRepo()->doesOnlyOneItemExist() and
1524  $this->object->getId()
1525  ) == ilContainer::SORT_MANUAL) {
1526  $this->ctrl->setParameter(
1527  $this,
1528  'switch_mode',
1529  self::VIEW_MODE_SORT
1530  );
1531  $this->tabs_gui->addSubTab(
1532  'id_content_ordering',
1533  $this->lng->txt('cntr_ordering'),
1534  $this->ctrl->getLinkTarget($this, 'switchViewMode')
1535  );
1536  }
1537 
1538  $this->ctrl->clearParameters($this);
1539  $this->tabs_gui->activateSubTab($a_active_subtab);
1540  }
1541  }
1542 
1543  $this->tabs_gui->activateTab('id_content');
1544  }
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 549 of file class.ilObjLinkResourceGUI.php.

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

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

◆ addLinkInputToForm()

ilObjLinkResourceGUI::addLinkInputToForm ( int  $mode)
protected

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

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

Referenced by initFormLink().

1111  : void
1112  {
1113  $tar = new ilLinkInputGUI(
1114  $this->lng->txt('type'),
1115  'tar'
1116  ); // lng var
1117  if ($mode == self::LINK_MOD_CREATE) {
1119  }
1120  $tar->setInternalLinkFilterTypes(
1121  [
1122  "PageObject",
1123  "GlossaryItem",
1124  "RepositoryItem",
1125  'WikiPage'
1126  ]
1127  );
1128  $tar->setExternalLinkMaxLength(1000);
1129  $tar->setInternalLinkFilterTypes(
1130  ["PageObject", "GlossaryItem", "RepositoryItem"]
1131  );
1132  $tar->setRequired(true);
1133  $this->form->addItem($tar);
1134  }
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 1620 of file class.ilObjLinkResourceGUI.php.

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

1620  : void
1621  {
1622  global $DIC;
1623 
1624  $ilLocator = $DIC['ilLocator'];
1625  if (is_object($this->object)) {
1626  $ilLocator->addItem(
1627  $this->object->getTitle(),
1628  $this->ctrl->getLinkTarget($this),
1629  "",
1630  $this->object->getRefId(),
1631  "webr"
1632  );
1633  }
1634  }
global $DIC
Definition: shib_login.php:25
+ Here is the call graph for this function:

◆ afterSave()

ilObjLinkResourceGUI::afterSave ( ilObject  $new_object)
protected

Definition at line 247 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().

247  : void
248  {
249  $new_web_link_repo = new ilWebLinkDatabaseRepository($new_object->getId());
250 
251  if ($this->form->getInput('tar_mode_type') === 'single') {
252  // Save link
253  $new_web_link_repo->createItem($this->draft_item);
254  $this->tpl->setOnScreenMessage(
255  'success',
256  $this->lng->txt('webr_link_added')
257  );
258  }
259 
260  if ($this->form->getInput('tar_mode_type') === 'list') {
261  // Save list
262  $new_web_link_repo->createList($this->draft_list);
263  $this->tpl->setOnScreenMessage(
264  'success',
265  $this->lng->txt('webr_list_added')
266  );
267  }
268 
269  // personal workspace
270  if ($this->id_type == self::WORKSPACE_NODE_ID) {
271  $this->ctrl->redirect($this, "editLinks");
272  } // repository
273  else {
275  "ilias.php?baseClass=ilLinkResourceHandlerGUI&ref_id=" .
276  $new_object->getRefId() . "&cmd=switchViewMode&switch_mode=2"
277  );
278  }
279  }
createItem(ilWebLinkDraftItem $item)
Creates a new item, complete with parameters.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 1636 of file class.ilObjLinkResourceGUI.php.

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

1636  : void
1637  {
1638  $obj_id = $this->object->getId();
1639 
1640  if ($this->getWebLinkRepo()->doesOnlyOneItemExist(true)) {
1642 
1643  $this->redirectToLink(
1644  $this->ref_id,
1645  $obj_id,
1646  $item->getResolvedLink((bool) $this->settings->get('links_dynamic'))
1647  );
1648  }
1649  }
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 1651 of file class.ilObjLinkResourceGUI.php.

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

1651  : void
1652  {
1653  if ($this->http->wrapper()->query()->has('link_id')) {
1654  $link_id = $this->http->wrapper()->query()->retrieve(
1655  'link_id',
1656  $this->refinery->kindlyTo()->int()
1657  );
1658 
1659  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
1660 
1661  $this->redirectToLink(
1662  $this->ref_id,
1663  $this->object->getId(),
1664  $item->getResolvedLink((bool) $this->settings->get('links_dynamic'))
1665  );
1666  }
1667  }
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 839 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(), and settings().

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

843  : bool {
844  $valid = $a_valid;
845 
846  $link_input = $this->form->getInput('tar');
847  $active = false;
848 
849  if ($a_mode == self::LINK_MOD_CREATE) {
850  $active = true;
851  } else {
852  $active = (bool) $this->form->getInput('act');
853  }
854 
855  $this->draft_item = new ilWebLinkDraftItem(
856  ilLinkInputGUI::isInternalLink($link_input),
857  $this->form->getInput('title'),
858  $this->form->getInput('desc'),
859  str_replace('"', '', $link_input),
860  $active,
861  []
862  );
863 
864  if (!$this->settings->get('links_dynamic')) {
865  return $valid;
866  }
867 
868  $this->draft_parameter = new ilWebLinkDraftParameter(
869  (int) $this->form->getInput('val'),
870  $this->form->getInput('nam')
871  );
872 
873  $error = $this->draft_parameter->validate();
874  if (!$error) {
875  return $valid;
876  }
877 
878  $this->draft_parameter = null;
879 
880  switch ($error) {
882  $this->form->getItemByPostVar('nam')->setAlert(
883  $this->lng->txt('links_no_name_given')
884  );
885  return false;
886 
888  $this->form->getItemByPostVar('val')->setAlert(
889  $this->lng->txt('links_no_value_given')
890  );
891  return false;
892 
893  default:
894  // Nothing entered => no error
895  return $valid;
896  }
897  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilErrorHandling $error
$valid
form( $class_path, string $cmd, string $submit_caption="")
static isInternalLink(string $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const 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 1324 of file class.ilObjLinkResourceGUI.php.

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

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

◆ deactivateLink()

ilObjLinkResourceGUI::deactivateLink ( )
protected

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

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

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

◆ deleteLinks()

ilObjLinkResourceGUI::deleteLinks ( )
protected

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

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

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

◆ deleteParameter()

ilObjLinkResourceGUI::deleteParameter ( )
protected

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

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

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

◆ deleteParameterForm()

ilObjLinkResourceGUI::deleteParameterForm ( )
protected

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

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

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

◆ editLink()

ilObjLinkResourceGUI::editLink ( )

Definition at line 402 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().

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

◆ editLinks()

ilObjLinkResourceGUI::editLinks ( )
protected

Start with manage mode.

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

References switchViewMode().

1157  : void
1158  {
1159  $this->switchViewMode(self::VIEW_MODE_MANAGE);
1160  }
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 92 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.

92  : void
93  {
94  $this->initViewMode();
95 
96  $base_class = $this->http->wrapper()->query()->retrieve(
97  'baseClass',
98  $this->refinery->kindlyTo()->string()
99  );
100  if ($base_class === ilLinkResourceHandlerGUI::class) {
101  $this->__prepareOutput();
102  }
103  $next_class = $this->ctrl->getNextClass($this);
104  $cmd = $this->ctrl->getCmd();
105  switch ($next_class) {
106  case "ilinfoscreengui":
107  $this->prepareOutput();
108  $this->infoScreenForward(); // forwards command
109  break;
110 
111  case 'ilobjectmetadatagui':
112  $this->checkPermission('write'); // #18563
113  $this->prepareOutput();
114  $this->tabs_gui->activateTab('id_meta_data');
115  $md_gui = new ilObjectMetaDataGUI($this->object);
116  $this->ctrl->forwardCommand($md_gui);
117  break;
118 
119  case 'ilpermissiongui':
120  $this->prepareOutput();
121  $this->tabs_gui->activateTab('id_permissions');
122  $perm_gui = new ilPermissionGUI($this);
123  $this->ctrl->forwardCommand($perm_gui);
124  break;
125 
126  case 'ilobjectcopygui':
127  $this->prepareOutput();
128  $cp = new ilObjectCopyGUI($this);
129  $cp->setType('webr');
130  $this->ctrl->forwardCommand($cp);
131  break;
132 
133  case 'ilexportgui':
134  $this->prepareOutput();
135  $this->tabs_gui->setTabActive('export');
136  $exp = new ilExportGUI($this);
137  $this->ctrl->forwardCommand($exp);
138  break;
139 
140  case "ilcommonactiondispatchergui":
141  $this->prepareOutput();
143  $this->ctrl->forwardCommand($gui);
144  break;
145 
146  case "ilpropertyformgui":
147  $mode = $this->ctrl->isAsynch() ?
148  self::LINK_MOD_ASYNC : self::LINK_MOD_EDIT;
149  $this->initFormLink($mode);
150  $this->ctrl->forwardCommand($this->form);
151  break;
152 
153  case "ilinternallinkgui":
154  $this->lng->loadLanguageModule("content");
155  $link_gui = new ilInternalLinkGUI("RepositoryItem", 0);
156  $link_gui->filterLinkType("PageObject");
157  $link_gui->filterLinkType("GlossaryItem");
158  $link_gui->filterLinkType("RepositoryItem");
159  $link_gui->setFilterWhiteList(true);
160  $this->ctrl->forwardCommand($link_gui);
161  break;
162 
163  default:
164  if ($this->getIdType() === ilObject2GUI::WORKSPACE_OBJECT_ID) {
165  parent::executeCommand();
166  break;
167  }
168  if (!$cmd) {
169  $cmd = 'view';
170  }
171  $this->prepareOutput();
172  $this->$cmd();
173  }
174 
175  if (!$this->getCreationMode()) {
176  $this->addHeaderAction();
177  }
178  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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.
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 1685 of file class.ilObjLinkResourceGUI.php.

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

1685  : void
1686  {
1687  $tpl = new ilTemplate(
1688  "tpl.export_html.html",
1689  true,
1690  true,
1691  "components/ILIAS/WebResource"
1692  );
1693 
1694  $items = $this->getWebLinkRepo()->getAllItemsAsContainer(true)
1695  ->getItems();
1696  foreach ($items as $item) {
1697  $tpl->setCurrentBlock("link_bl");
1698  $tpl->setVariable("LINK_URL", $item->getResolvedLink(false));
1699  $tpl->setVariable("LINK_TITLE", $item->getTitle());
1700  $tpl->setVariable("LINK_DESC", $item->getDescription() ?? '');
1701  $tpl->setVariable("LINK_CREATE", $item->getCreateDate()
1702  ->format('Y-m-d H-i-s'));
1703  $tpl->setVariable("LINK_UPDATE", $item->getLastUpdate()
1704  ->format('Y-m-d H-i-s'));
1706  }
1707 
1708  $tpl->setVariable("CREATE_DATE", $this->object->getCreateDate());
1709  $tpl->setVariable("LAST_UPDATE", $this->object->getLastUpdateDate());
1710  $tpl->setVariable("TXT_TITLE", $this->object->getTitle());
1711  $tpl->setVariable("TXT_DESC", $this->object->getLongDescription());
1712 
1713  $tpl->setVariable(
1714  "INST_ID",
1715  ($this->settings->get('short_inst_name') != "")
1716  ? $this->settings->get('short_inst_name')
1717  : "ILIAS"
1718  );
1719 
1720  ilUtil::deliverData($tpl->get(), "bookmarks.html");
1721  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static deliverData(string $a_data, string $a_filename, string $mime="application/octet-stream")
ilGlobalTemplateInterface $tpl
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
+ 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 479 of file class.ilObjLinkResourceGUI.php.

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

Referenced by showToolbar().

480  {
481  global $DIC;
482 
483  $f = $DIC->ui()->factory();
484  $r = $DIC->ui()->renderer();
485 
486  // check if form was already set
487  if ($this->form == null) {
488  $this->initFormLink(self::LINK_MOD_SET_LIST);
489  }
490 
491  $form_id = 'form_' . $this->form->getId();
492 
493  $submit = $f->button()->primary($this->lng->txt('save'), '#')
494  ->withOnLoadCode(
495  function ($id) use ($form_id) {
496  return "$('#{$id}').click(function() { $('#{$form_id}').submit(); return false; });";
497  }
498  );
499  $info = $f->messageBox()->info($this->lng->txt('webr_new_list_info'));
500 
501  $modal = $f->modal()->roundtrip(
502  $this->lng->txt('webr_new_list'),
503  $f->legacy($r->render($info) . $this->form->getHTML())
504  )
505  ->withActionButtons([$submit]);
506 
507  $submit = '';
508  if ($this->http->wrapper()->post()->has('sbmt')) {
509  $submit = $this->http->wrapper()->post()->retrieve(
510  'sbmt',
511  $this->refinery->kindlyTo()->string()
512  );
513  }
514  // modal triggers its show signal on load if form validation failed
515  if ($submit === 'submit') {
516  $modal = $modal->withOnLoad($modal->getShowSignal());
517  }
518  return $modal;
519  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:25
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 74 of file class.ilObjLinkResourceGUI.php.

74  : string
75  {
76  return "webr";
77  }

◆ getWebLinkRepo()

ilObjLinkResourceGUI::getWebLinkRepo ( )
protected

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

References ILIAS\Repository\object().

Referenced by activateTabs(), callDirectLink(), callLink(), confirmDeleteLink(), deactivateLink(), deleteLinks(), deleteParameter(), deleteParameterForm(), exportHTML(), initFormLink(), initFormSettings(), saveAddLink(), saveLinkList(), settings(), setValuesFromLink(), showToolbar(), updateLink(), and updateLinks().

70  {
71  return new ilWebLinkDatabaseRepository($this->object->getId());
72  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ history()

ilObjLinkResourceGUI::history ( )

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

References ilObject2GUI\checkPermission(), ilHistoryTableGUI\initTable(), and ILIAS\Repository\object().

1475  : void
1476  {
1477  $this->checkPermission('write');
1478  $this->tabs_gui->activateTab('id_history');
1479 
1480  $hist_gui = new ilHistoryTableGUI(
1481  $this,
1482  "history",
1483  $this->object->getId(),
1484  $this->object->getType()
1485  );
1486  $hist_gui->initTable();
1487  $this->tpl->setContent($hist_gui->getHTML());
1488  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ 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 1442 of file class.ilObjLinkResourceGUI.php.

References ILIAS\Repository\ctrl().

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

◆ infoScreenForward()

ilObjLinkResourceGUI::infoScreenForward ( )

show information screen

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

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

Referenced by executeCommand().

1453  : void
1454  {
1455  if (!$this->checkPermissionBool('visible')) {
1456  $this->checkPermission('read');
1457  }
1458  $this->tabs_gui->activateTab('id_info');
1459 
1460  $info = new ilInfoScreenGUI($this);
1461 
1462  $info->enablePrivateNotes();
1463 
1464  // standard meta data
1465  $info->addMetaDataSections(
1466  $this->object->getId(),
1467  0,
1468  $this->object->getType()
1469  );
1470 
1471  // forward the command
1472  $this->ctrl->forwardCommand($info);
1473  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
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:

◆ initCreateForm()

ilObjLinkResourceGUI::initCreateForm ( string  $new_type)
protected

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

References $form, and initFormLink().

Referenced by saveObject().

181  {
182  $this->initFormLink(self::LINK_MOD_CREATE);
183  return $this->form;
184  }
+ 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 899 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().

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

◆ initFormSettings()

ilObjLinkResourceGUI::initFormSettings ( )
protected

Definition at line 333 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().

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

References ILIAS\Repository\form().

Referenced by save(), and saveLinkList().

822  : void
823  {
824  if ($a_mode == self::LINK_MOD_CREATE) {
825  $this->draft_list = new ilWebLinkDraftList(
826  $this->form->getInput('title'),
827  $this->form->getInput('desc')
828  );
829  }
830 
831  if ($a_mode == self::LINK_MOD_SET_LIST) {
832  $this->draft_list = new ilWebLinkDraftList(
833  $this->form->getInput('lti'),
834  $this->form->getInput('tde')
835  );
836  }
837  }
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ 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 82 of file class.ilObjLinkResourceGUI.php.

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

Referenced by executeCommand(), and switchViewMode().

82  : void
83  {
84  if ($new_view_mode !== null) {
85  ilSession::set('webr_view_mode', $new_view_mode);
86  }
87  if (ilSession::has('webr_view_mode')) {
88  $this->view_mode = (int) ilSession::get('webr_view_mode');
89  }
90  }
static get(string $a_var)
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 1202 of file class.ilObjLinkResourceGUI.php.

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

Referenced by view().

1202  : void
1203  {
1204  $this->checkPermission('write');
1205  $this->activateTabs('content', 'id_content_manage');
1206 
1207  $this->tpl->addBlockFile(
1208  'ADM_CONTENT',
1209  'adm_content',
1210  'tpl.webr_manage.html',
1211  'components/ILIAS/WebResource'
1212  );
1213  $this->showToolbar('ACTION_BUTTONS');
1214 
1215  $table = new ilWebResourceEditableLinkTableGUI($this, 'view');
1216  $table->parse();
1217 
1219 
1220  $this->tpl->addJavaScript("assets/js/intLink.js");
1221  $this->tpl->addJavascript("assets/js/Form.js");
1222 
1223  $this->tpl->setVariable('TABLE_LINKS', $table->getHTML() . $js);
1224  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
+ 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 1669 of file class.ilObjLinkResourceGUI.php.

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

Referenced by callDirectLink(), and callLink().

1673  : void {
1674  if ($a_url) {
1676  "webr",
1677  $a_ref_id,
1678  $a_obj_id,
1679  $this->user->getId()
1680  );
1681  ilUtil::redirect($a_url);
1682  }
1683  }
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 186 of file class.ilObjLinkResourceGUI.php.

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

186  : void
187  {
188  $this->initFormLink(self::LINK_MOD_CREATE);
189  $valid = $this->form->checkInput();
190  if (
191  $this->checkLinkInput(self::LINK_MOD_CREATE, $valid, 0) &&
192  $this->form->getInput('tar_mode_type') === 'single'
193  ) {
194  $this->saveObject();
195  } elseif ($valid && $this->form->getInput('tar_mode_type') == 'list') {
196  $this->initList(self::LINK_MOD_CREATE);
197  $this->saveObject();
198  } else {
199  // Data incomplete or invalid
200  $this->tpl->setOnScreenMessage(
201  'failure',
202  $this->lng->txt('err_check_input')
203  );
204  $this->form->setValuesByPost();
205  $this->tpl->setContent($this->form->getHTML());
206  }
207  }
$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 558 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(), and settings().

558  : void
559  {
560  $this->checkPermission('write');
561 
562  $form = $this->initFormLink(self::LINK_MOD_ADD);
563  $valid = $form->checkInput();
564  if ($this->checkLinkInput(
565  self::LINK_MOD_ADD,
566  $valid,
567  0
568  )
569  ) {
570  if (
571  $this->settings->get('links_dynamic') &&
572  $this->draft_parameter !== null
573  ) {
574  $this->draft_item->addParameter($this->draft_parameter);
575  }
576  $this->getWebLinkRepo()->createItem($this->draft_item);
577 
578  $this->tpl->setOnScreenMessage(
579  'success',
580  $this->lng->txt('webr_link_added'),
581  true
582  );
583  $this->ctrl->redirect($this, 'view');
584  }
585  $this->tpl->setOnScreenMessage(
586  'failure',
587  $this->lng->txt('err_check_input')
588  );
589  $this->form->setValuesByPost();
590  $this->activateTabs('content', 'id_content_view');
591  $this->tpl->setContent($form->getHTML());
592  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
$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)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveLinkList()

ilObjLinkResourceGUI::saveLinkList ( )

Definition at line 521 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().

521  : void
522  {
523  $this->checkPermission('write');
524  $form = $this->initFormLink(self::LINK_MOD_SET_LIST);
525  $valid = $form->checkInput();
526  if ($valid) {
527  $this->object->setTitle($form->getInput('lti'));
528  $this->object->setDescription($form->getInput('tde'));
529  $this->object->update();
530 
531  $this->initList(self::LINK_MOD_SET_LIST);
532  $this->getWebLinkRepo()->createList($this->draft_list);
533  $this->tpl->setOnScreenMessage(
534  'success',
535  $this->lng->txt('webr_list_set'),
536  true
537  );
538  $this->ctrl->redirect($this, 'view');
539  }
540  $this->tpl->setOnScreenMessage(
541  'failure',
542  $this->lng->txt('err_check_input'),
543  true
544  );
546  $this->view();
547  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
$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-...
+ Here is the call graph for this function:

◆ saveObject()

ilObjLinkResourceGUI::saveObject ( )

Definition at line 209 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().

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

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

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

◆ setTabs()

ilObjLinkResourceGUI::setTabs ( )
protected

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

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

1546  : void
1547  {
1548  global $DIC;
1549 
1550  $ilHelp = $DIC['ilHelp'];
1551  $ilHelp->setScreenIdComponent("webr");
1552 
1553  if ($this->checkPermissionBool('read')) {
1554  $this->tabs_gui->addTab(
1555  "id_content",
1556  $this->lng->txt("content"),
1557  $this->ctrl->getLinkTarget($this, "view")
1558  );
1559  }
1560 
1561  if (
1562  $this->checkPermissionBool('visible') ||
1563  $this->checkPermissionBool('read')
1564  ) {
1565  $this->tabs_gui->addTab(
1566  "id_info",
1567  $this->lng->txt("info_short"),
1568  $this->ctrl->getLinkTarget($this, "infoScreen")
1569  );
1570  }
1571 
1572  if ($this->checkPermissionBool('write') and !$this->getCreationMode()) {
1573  $this->tabs_gui->addTab(
1574  "id_settings",
1575  $this->lng->txt("settings"),
1576  $this->ctrl->getLinkTarget($this, "settings")
1577  );
1578  }
1579 
1580  if ($this->checkPermissionBool('write')) {
1581  $this->tabs_gui->addTab(
1582  "id_history",
1583  $this->lng->txt("history"),
1584  $this->ctrl->getLinkTarget($this, "history")
1585  );
1586  }
1587 
1588  if ($this->checkPermissionBool('write')) {
1589  $mdgui = new ilObjectMetaDataGUI($this->object);
1590  $mdtab = $mdgui->getTab();
1591  if ($mdtab) {
1592  $this->tabs_gui->addTab(
1593  "id_meta_data",
1594  $this->lng->txt("meta_data"),
1595  $mdtab
1596  );
1597  }
1598  }
1599 
1600  if ($this->checkPermissionBool('write')) {
1601  $this->tabs_gui->addTab(
1602  'export',
1603  $this->lng->txt('export'),
1604  $this->ctrl->getLinkTargetByClass('ilexportgui', '')
1605  );
1606  }
1607 
1608  // will add permission tab if needed
1609  parent::setTabs();
1610  }
Class ilObjectMetaDataGUI.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
global $DIC
Definition: shib_login.php:25
+ Here is the call graph for this function:

◆ settings()

ilObjLinkResourceGUI::settings ( )
protected

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

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

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

281  : void
282  {
283  $this->checkPermission('write');
284  $this->tabs_gui->activateTab('id_settings');
285 
286  $form = $this->initFormSettings();
287  $this->tpl->setContent($this->ui_renderer->render($form));
288  }
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 809 of file class.ilObjLinkResourceGUI.php.

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

Referenced by editLink().

809  : void
810  {
811  $item = $this->getWebLinkRepo()->getItemByLinkId($a_link_id);
812  $this->form->setValuesByArray(
813  array(
814  'title' => $item->getTitle(),
815  'tar' => $item->getTarget(),
816  'desc' => $item->getDescription(),
817  'act' => (int) $item->isActive()
818  )
819  );
820  }
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 1226 of file class.ilObjLinkResourceGUI.php.

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

Referenced by view().

1226  : void
1227  {
1228  $this->checkPermission('read');
1229  $this->activateTabs('content', 'id_content_view');
1230 
1231  $table = new ilWebResourceLinkTableGUI($this, 'showLinks');
1232  $table->parse();
1233 
1234  $this->tpl->addBlockFile(
1235  'ADM_CONTENT',
1236  'adm_content',
1237  'tpl.webr_view.html',
1238  'components/ILIAS/WebResource'
1239  );
1240  $this->showToolbar('ACTION_BUTTONS');
1241  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
1242  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
+ 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 1285 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().

1285  : void
1286  {
1287  global $DIC;
1288 
1289  $tool = new ilToolbarGUI();
1290  $tool->setFormAction($this->ctrl->getFormAction($this));
1291 
1292  $f = $DIC->ui()->factory();
1293  $r = $DIC->ui()->renderer();
1294 
1295  if (
1296  $this->getWebLinkRepo()->doesListExist() &&
1297  $this->checkPermissionBool('write')
1298  ) {
1299  $tool->addButton(
1300  $this->lng->txt('webr_add'),
1301  $this->ctrl->getLinkTarget($this, 'addLink')
1302  );
1303  } elseif ($this->checkPermissionBool('write')) {
1304  $modal = $this->getLinkToListModal();
1305  $button = $f->button()->standard(
1306  $this->lng->txt('webr_set_to_list'),
1307  '#'
1308  )
1309  ->withOnClick($modal->getShowSignal());
1310 
1311  $this->tpl->setVariable("MODAL", $r->render([$modal]));
1312 
1313  $tool->addComponent($button);
1314  }
1315 
1316  $download_button = $f->button()->standard(
1317  $this->lng->txt('export_html'),
1318  $this->ctrl->getLinkTarget($this, 'exportHTML')
1319  );
1320  $tool->addComponent($download_button);
1321  $this->tpl->setVariable($a_tpl_var, $tool->getHTML());
1322  }
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:25
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sort()

ilObjLinkResourceGUI::sort ( )
protected

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

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

Referenced by view().

1244  : void
1245  {
1246  $this->checkPermission('write');
1247  $this->activateTabs('content', 'id_content_ordering');
1248 
1249  $table = new ilWebResourceLinkTableGUI($this, 'sort', true);
1250  $table->parse();
1251 
1252  $this->tpl->addBlockFile(
1253  'ADM_CONTENT',
1254  'adm_content',
1255  'tpl.webr_view.html',
1256  'components/ILIAS/WebResource'
1257  );
1258  $this->showToolbar('ACTION_BUTTONS');
1259  $this->tpl->setVariable('LINK_TABLE', $table->getHTML());
1260  }
checkPermission(string $perm, string $cmd="", string $type="", int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
activateTabs(string $a_active_tab, string $a_active_subtab='')
Activate tab and subtabs.
+ 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 1139 of file class.ilObjLinkResourceGUI.php.

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

Referenced by editLinks().

1139  : void
1140  {
1141  $new_view_mode = $this->view_mode;
1142  if ($force_view_mode !== null) {
1143  $new_view_mode = $force_view_mode;
1144  } elseif ($this->http->wrapper()->query()->has('switch_mode')) {
1145  $new_view_mode = $this->http->wrapper()->query()->retrieve(
1146  'switch_mode',
1147  $this->refinery->kindlyTo()->int()
1148  );
1149  }
1150  $this->initViewMode($new_view_mode);
1151  $this->view();
1152  }
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 427 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(), ILIAS\Repository\refinery(), settings(), and ilPropertyFormGUI\setValuesByPost().

427  : void
428  {
429  $form = $this->initFormLink(self::LINK_MOD_EDIT);
430  $valid = $form->checkInput();
431  $link_id = 0;
432  if ($this->http->wrapper()->query()->has('link_id')) {
433  $link_id = $this->http->wrapper()->query()->retrieve(
434  'link_id',
435  $this->refinery->kindlyTo()->int()
436  );
437  }
438  if ($this->checkLinkInput(
439  self::LINK_MOD_EDIT,
440  $valid,
441  $link_id
442  )) {
443  $item = $this->getWebLinkRepo()->getItemByLinkId($link_id);
444  foreach ($item->getParameters() as $parameter) {
445  $this->draft_item->addParameter($parameter);
446  }
447 
448  if (
449  $this->settings->get('links_dynamic') &&
450  $this->draft_parameter !== null
451  ) {
452  $this->draft_item->addParameter($this->draft_parameter);
453  }
454  $this->getWebLinkRepo()->updateItem($item, $this->draft_item);
455 
456  if (!$this->getWebLinkRepo()->doesListExist()) {
457  $this->object->setTitle($form->getInput('title'));
458  $this->object->setDescription($form->getInput('desc'));
459  $this->object->update();
460  }
461  $this->tpl->setOnScreenMessage(
462  'success',
463  $this->lng->txt('settings_saved'),
464  true
465  );
466  $this->ctrl->redirect($this, 'view');
467  }
468  $this->tpl->setOnScreenMessage(
469  'failure',
470  $this->lng->txt('err_check_input')
471  );
473  $this->tpl->setContent($form->getHTML());
474  }
$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-...
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ updateLinks()

ilObjLinkResourceGUI::updateLinks ( )
protected

Definition at line 664 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().

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

◆ view()

ilObjLinkResourceGUI::view ( )

Definition at line 1162 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().

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

◆ $draft_list

ilWebLinkDraftList ilObjLinkResourceGUI::$draft_list = null
private

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

◆ $draft_parameter

ilWebLinkDraftParameter ilObjLinkResourceGUI::$draft_parameter = null
private

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

◆ $form

ilPropertyFormGUI ilObjLinkResourceGUI::$form = null
private

Definition at line 49 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.

◆ $navigationHistory

ilNavigationHistory ilObjLinkResourceGUI::$navigationHistory
protected

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

◆ $view_mode

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

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

Referenced by switchViewMode().

◆ LINK_MOD_ADD

const ilObjLinkResourceGUI::LINK_MOD_ADD = 3
protected

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

◆ LINK_MOD_ASYNC

const ilObjLinkResourceGUI::LINK_MOD_ASYNC = 6
protected

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

◆ LINK_MOD_CREATE

const ilObjLinkResourceGUI::LINK_MOD_CREATE = 1
protected

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

◆ LINK_MOD_EDIT

const ilObjLinkResourceGUI::LINK_MOD_EDIT = 2
protected

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

◆ LINK_MOD_SET_LIST

const ilObjLinkResourceGUI::LINK_MOD_SET_LIST = 4
protected

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

◆ VIEW_MODE_MANAGE

const ilObjLinkResourceGUI::VIEW_MODE_MANAGE = 2
protected

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

◆ VIEW_MODE_SORT

const ilObjLinkResourceGUI::VIEW_MODE_SORT = 3
protected

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

◆ VIEW_MODE_VIEW

const 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: