44 $attributes = $this->facade->entryFactory()->loadParsedAttributesByEntryId($entry->
getId());
45 $type = $this->facade->typeFactory()->getInstanceForString(
$type);
46 switch (
$type->getId()) {
48 $prefix =
"bib_default_";
50 $attr = array(
"isbn");
52 $attr = array(
"pmid");
56 $attr = array(
"issn");
58 $attr = array(
"title",
"author",
"year",
"number",
"volume");
62 $prefix =
"ris_" . strtolower($entry->
getType()) .
"_";
68 $attr = array(
"ti",
"t1",
"au",
"py",
"is",
"vl");
74 if (
sizeof($attr) == 1) {
75 if (($attr[0] ==
"doi") || ($attr[0] ==
"pmid")) {
78 } elseif ($attr[0] ==
"do") {
86 foreach ($attr as
$a) {
88 if (strlen($url_params) > 1) {
98 $full_link = $this->library->getUrl() . $url_params;
112 if ($this->library->getImg()) {
115 $button->setImage($this->library->getImg(),
false);
116 $button->setTarget(
'_blank');
118 return $button->render();
122 $button->setTarget(
'_blank');
123 $button->setCaption(
'bibl_link_online');
125 return $button->render();
143 if (
$type->getStringRepresentation() ===
'ris') {
171 } elseif (
$type->getStringRepresentation() ===
'bib') {
getButton(ilBiblFactoryFacadeInterface $bibl_factory_facade, ilBiblEntry $entry)
Interface ilBiblFactoryFacadeInterface.
generateLibraryLink(ilBiblEntry $entry, $type)
Interface ilBiblLibraryInterface.
formatAttribute($a, $type, $attributes, $prefix)
__construct(\ilBiblLibraryInterface $library, \ilBiblFactoryFacade $facade)
ilBiblLibraryPresentationGUI constructor.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
Class ilBiblFactoryFacade.
Class ilBiblLibraryPresentationGUI.