ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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}
An exception for terminatinating execution or to throw for unit testing.
ADT form bridge base class.
addBasicFieldProperties(ilFormPropertyGUI $a_field, ilADTDefinition $a_def)
Helper method to handle generic properties like setRequired(), setInfo()
getElementId()
Get element id.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
ADT base class.
Definition: class.ilADT.php:12