ILIAS  release_4-4 Revision
class.ilBibliographicDetailsGUI.php
Go to the documentation of this file.
1 <?php
2 
3 require_once "./Modules/Bibliographic/classes/class.ilBibliographicEntry.php";
4 
10 {
16  public function showDetails(ilObjBibliographic $bibl_obj)
17  {
18  global $tpl, $ilTabs, $ilCtrl, $lng;
19 
20  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
21  $form = new ilPropertyFormGUI();
22 
23 
24  $ilTabs->clearTargets();
25  $ilTabs->setBackTarget("back", $ilCtrl->getLinkTarget($this, 'showContent'));
26 
27  $form->setTitle($lng->txt('detail_view'));
28 
29 
30  $entry = new ilBibliographicEntry($bibl_obj->getFiletype(), $_GET['entryId']);
31  $attributes = $entry->getAttributes();
32 
33  //translate array key in order to sort by those keys
34  foreach($attributes as $key => $attribute)
35  {
36  //Check if there is a specific language entry
37  if($lng->exists($key))
38  {
39  $strDescTranslated = $lng->txt($key);
40  }
41  //If not: get the default language entry
42  else
43  {
44  $arrKey = explode("_",$key);
45  $strDescTranslated = $lng->txt($arrKey[0]."_default_".$arrKey[2]);
46  }
47  unset($attributes[$key]);
48  $attributes[$strDescTranslated] = $attribute;
49  }
50 
51  // sort attributes alphabetically by their array-key
52  ksort($attributes, SORT_STRING);
53 
54  // render attributes to html
55  foreach($attributes as $key => $attribute)
56  {
57  $ci = new ilCustomInputGUI($key);
58  $ci->setHtml($attribute);
59  $form->addItem($ci);
60  }
61 
62  // set content and title
63  $tpl->setContent($form->getHTML());
64 
65  //Permanent Link
66  $tpl->setPermanentLink("bibl", $bibl_obj->getRefId(),"_".$_GET['entryId']);
67 
68  }
69 
70 
71 
72 }
73 
74 ?>
This class represents a property form user interface.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
Class ilBibliographicDetailsGUI The detailled view on each entry.
showDetails(ilObjBibliographic $bibl_obj)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
This class represents a custom property in a property form.
global $lng
Definition: privfeed.php:40
Class ilObjBibliographic.
Class ilObjBibliographic.