ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilADTInternalLinkFormBridge Class Reference

external link form bridge More...

+ Inheritance diagram for ilADTInternalLinkFormBridge:
+ Collaboration diagram for ilADTInternalLinkFormBridge:

Public Member Functions

 addToForm ()
 Add element to form. More...
 
 importFromPost ()
 Import from post. More...
 
- Public Member Functions inherited from ilADTFormBridge
 __construct (ilADT $a_adt)
 Constructor. More...
 
 getADT ()
 Get ADT. More...
 
 setForm (ilPropertyFormGUI $a_form)
 Set form. More...
 
 getForm ()
 Get form. More...
 
 setElementId ($a_value)
 Set element id (aka form field) More...
 
 getElementId ()
 Get element id. More...
 
 setTitle ($a_value)
 Set title (aka form field caption) More...
 
 getTitle ()
 Get title. More...
 
 setInfo ($a_value)
 Set info (aka form field info text) More...
 
 getInfo ()
 Get info. More...
 
 setParentElement ($a_value)
 Set parent element. More...
 
 getParentElement ()
 Get parent element. More...
 
 setDisabled ($a_value)
 Set disabled. More...
 
 isDisabled ()
 Get disabled. More...
 
 setRequired ($a_value)
 Set required. More...
 
 isRequired ()
 Get required. More...
 
 addToForm ()
 Add ADT-specific fields to form. More...
 
 addJS (ilTemplate $a_tpl)
 Add ADT-specific JS-files to template. More...
 
 shouldBeImportedFromPost (ilADTFormBridge $a_parent_adt=null)
 Check if incoming values should be imported at all. More...
 
 importFromPost ()
 Import values from form request POST data. More...
 
 validate ()
 Validate ADT and parse error codes. More...
 
 setExternalErrors ($a_errors)
 

Protected Member Functions

 isValidADT (ilADT $a_adt)
 Is valid type. More...
 
- Protected Member Functions inherited from ilADTFormBridge
 isValidADT (ilADT $a_adt)
 Check if given ADT is valid. More...
 
 setADT (ilADT $a_adt)
 Set ADT. More...
 
 addBasicFieldProperties (ilFormPropertyGUI $a_field, ilADTDefinition $a_def)
 Helper method to handle generic properties like setRequired(), setInfo() More...
 
 findParentElementInForm ()
 Try to find parent element in form (could be option) More...
 
 addToParentElement (ilFormPropertyGUI $a_field)
 Add form field to parent element. More...
 
 isActiveForSubItems ($a_parent_option=null)
 Check if element is currently active for subitem(s) More...
 

Additional Inherited Members

- Protected Attributes inherited from ilADTFormBridge
 $adt
 
 $form
 
 $id
 
 $title
 
 $info
 
 $parent_element
 
 $required
 
 $disabled
 

Detailed Description

external link form bridge

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 11 of file class.ilADTInternalLinkFormBridge.php.

Member Function Documentation

◆ addToForm()

ilADTInternalLinkFormBridge::addToForm ( )

Add element to form.

Definition at line 27 of file class.ilADTInternalLinkFormBridge.php.

References $def, ilADTFormBridge\addBasicFieldProperties(), ilADTFormBridge\addToParentElement(), ilADTFormBridge\getADT(), ilADTFormBridge\getElementId(), and ilADTFormBridge\getTitle().

28  {
29  $def = $this->getADT()->getCopyOfDefinition();
30 
31  $subitems = new ilRepositorySelector2InputGUI(
32  $this->getTitle(),
33  $this->getElementId(),
34  false
35  );
36  $subitems->setValue($this->getADT()->getTargetRefId());
37  $exp = $subitems->getExplorerGUI();
38  $exp->setSkipRootNode(false);
39  $exp->setRootId(ROOT_FOLDER_ID);
40  $this->addBasicFieldProperties($subitems, $def);
41  $this->addToParentElement($subitems);
42  }
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
addBasicFieldProperties(ilFormPropertyGUI $a_field, ilADTDefinition $a_def)
Helper method to handle generic properties like setRequired(), setInfo()
getElementId()
Get element id.
$def
Definition: croninfo.php:21
+ Here is the call graph for this function:

◆ importFromPost()

ilADTInternalLinkFormBridge::importFromPost ( )

Import from post.

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

References ilADTFormBridge\getADT(), ilADTFormBridge\getElementId(), and ilADTFormBridge\getForm().

48  {
49  $this->getADT()->setTargetRefId($this->getForm()->getInput($this->getElementId()));
50  }
getElementId()
Get element id.
+ Here is the call graph for this function:

◆ isValidADT()

ilADTInternalLinkFormBridge::isValidADT ( ilADT  $a_adt)
protected

Is valid type.

Parameters
ilADT$a_adt
Returns
bool

Definition at line 19 of file class.ilADTInternalLinkFormBridge.php.

20  {
21  return $a_adt instanceof ilADTInternalLink;
22  }

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