ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilADTInternalLinkFormBridge.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
12 {
13 
19  protected function isValidADT(ilADT $a_adt)
20  {
21  return $a_adt instanceof ilADTInternalLink;
22  }
23 
27  public function addToForm()
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  }
43 
47  public function importFromPost()
48  {
49  $this->getADT()->setTargetRefId($this->getForm()->getInput($this->getElementId()));
50  }
51 }
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
ADT form bridge base class.
ADT base class.
Definition: class.ilADT.php:11
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