ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDataCollectionTreePickInputGUI Class Reference

Class ilDataCollectionDatatype. More...

+ Inheritance diagram for ilDataCollectionTreePickInputGUI:
+ Collaboration diagram for ilDataCollectionTreePickInputGUI:

Public Member Functions

 __construct ($title, $post_var)
 
 getHtml ()
 
 setValueByArray ($value)
 
- Public Member Functions inherited from ilCustomInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setHtml ($a_html)
 Set Html. More...
 
 getHtml ()
 Get Html. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 

Protected Attributes

 $lng
 
- Protected Attributes inherited from ilCustomInputGUI
 $html
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Private Attributes

 $customHTML
 
 $title_input
 
 $search_input
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionTreePickInputGUI::__construct (   $title,
  $post_var 
)
Parameters
string$title
string$post_var

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

References $lng, ilFormPropertyGUI\$title, $tpl, ilFormPropertyGUI\getPostVar(), and ilFormPropertyGUI\getTitle().

42  {
43  global $lng, $tpl;
44  parent::__construct($title, $post_var);
45  $tpl->addJavaScript('./Modules/DataCollection/js/ilDclTreeSearch.js');
46  $this->title_input = new ilTextInputGUI($this->getTitle(), "display_" . $this->getPostVar());
47  $this->title_input->setDisabled(true);
48  $this->title_input->setInfo($lng->txt("dcl_ilias_refere nce_info"));
49  $this->search_input = new ilTextInputGUI($this->getTitle(), "search_" . $this->getPostVar());
50  $this->search_input->setDisabled(false);
51  $this->search_input->setInfo($lng->txt('dcl_ilias_reference_info'));
52  $this->hidden_input = new ilHiddenInputGUI($this->getPostVar());
53  $this->lng = $lng;
54  }
getPostVar()
Get Post Variable.
This class represents a hidden form property in a property form.
This class represents a text property in a property form.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
+ Here is the call graph for this function:

Member Function Documentation

◆ getHtml()

ilDataCollectionTreePickInputGUI::getHtml ( )
Returns
string

Definition at line 60 of file class.ilDataCollectionTreePickInputGUI.php.

References $ilCtrl, $tpl, ilUtil\getImagePath(), and ilFormPropertyGUI\getPostVar().

60  {
61  global $ilCtrl;
62  $tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
63  $tpl->setVariable("FIELD_ID", $this->getPostVar());
64  $tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
65  $tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.gif"));
66 
67  return
68  $this->title_input->getToolbarHTML() . "" . $this->search_input->getTableFilterHTML() . $this->hidden_input->getToolbarHTML()
69  . " <a href='#' id='search_button_" . $this->getPostVar() . "'>" . $this->lng->txt('search') . "</a>" . $tpl->get();
70  }
getPostVar()
Get Post Variable.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
+ Here is the call graph for this function:

◆ setValueByArray()

ilDataCollectionTreePickInputGUI::setValueByArray (   $value)
Parameters
$value

Definition at line 76 of file class.ilDataCollectionTreePickInputGUI.php.

References $path, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilFormPropertyGUI\getPostVar().

76  {
77  parent::setValueByArray($value);
78  include_once './Services/Tree/classes/class.ilPathGUI.php';
79  $path = new ilPathGUI();
80  $reference = $value[$this->getPostVar()];
81  if ($reference) {
82  $pathString = $path->getPath(ROOT_FOLDER_ID, $reference);
83  $id = ilObject::_lookupObjId($reference);
84  $this->title_input->setValue($pathString . " > " . ilObject::_lookupTitle($id));
85  $this->hidden_input->setValue($reference);
86  }
87  }
Creates a path for a start and endnode.
getPostVar()
Get Post Variable.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
$path
Definition: index.php:22
+ Here is the call graph for this function:

Field Documentation

◆ $customHTML

ilDataCollectionTreePickInputGUI::$customHTML
private

Definition at line 23 of file class.ilDataCollectionTreePickInputGUI.php.

◆ $lng

ilDataCollectionTreePickInputGUI::$lng
protected

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

Referenced by __construct().

◆ $search_input

ilDataCollectionTreePickInputGUI::$search_input
private

Definition at line 31 of file class.ilDataCollectionTreePickInputGUI.php.

◆ $title_input

ilDataCollectionTreePickInputGUI::$title_input
private

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


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