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

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.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

Detailed Description

Constructor & Destructor Documentation

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

Reimplemented from ilCustomInputGUI.

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

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

{
global $lng, $tpl;
$tpl->addJavaScript('./Modules/DataCollection/js/ilDclTreeSearch.js');
$this->title_input = new ilTextInputGUI($this->getTitle(), "display_" . $this->getPostVar());
$this->title_input->setDisabled(true);
$this->title_input->setInfo($lng->txt("dcl_ilias_refere nce_info"));
$this->search_input = new ilTextInputGUI($this->getTitle(), "search_" . $this->getPostVar());
$this->search_input->setDisabled(false);
$this->search_input->setInfo($lng->txt('dcl_ilias_reference_info'));
$this->hidden_input = new ilHiddenInputGUI($this->getPostVar());
$this->lng = $lng;
}

+ Here is the call graph for this function:

Member Function Documentation

ilDataCollectionTreePickInputGUI::getHtml ( )
Returns
string

Reimplemented from ilCustomInputGUI.

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

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

{
global $ilCtrl;
$tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
$tpl->setVariable("FIELD_ID", $this->getPostVar());
$tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
$tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.gif"));
return
$this->title_input->getToolbarHTML() . "" . $this->search_input->getTableFilterHTML() . $this->hidden_input->getToolbarHTML()
. " <a href='#' id='search_button_" . $this->getPostVar() . "'>" . $this->lng->txt('search') . "</a>" . $tpl->get();
}

+ Here is the call graph for this function:

ilDataCollectionTreePickInputGUI::setValueByArray (   $value)
Parameters
$value

Reimplemented from ilCustomInputGUI.

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

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

{
include_once './Services/Tree/classes/class.ilPathGUI.php';
$path = new ilPathGUI();
$reference = $value[$this->getPostVar()];
if ($reference) {
$pathString = $path->getPath(ROOT_FOLDER_ID, $reference);
$id = ilObject::_lookupObjId($reference);
$this->title_input->setValue($pathString . " > " . ilObject::_lookupTitle($id));
$this->hidden_input->setValue($reference);
}
}

+ Here is the call graph for this function:

Field Documentation

ilDataCollectionTreePickInputGUI::$customHTML
private

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

ilDataCollectionTreePickInputGUI::$lng
protected

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

Referenced by __construct().

ilDataCollectionTreePickInputGUI::$search_input
private

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

ilDataCollectionTreePickInputGUI::$title_input
private

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


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