42 $attributes = $this->facade->entryFactory()->loadParsedAttributesByEntryId($entry->
getId());
43 $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 (count($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) {
97 return $this->library->getUrl() . $url_params;
105 if ($this->library->getImg()) {
107 $button->setImage($this->library->getImg(),
false);
108 $button->addCSSClass(
"btn");
109 $button->addCSSClass(
"btn-default");
114 $button->setTarget(
'_blank');
115 $button->setCaption(
'bibl_link_online');
117 return $button->render();
135 if (strlen($attributes[$prefix .
"sn"]) <= 9) {
getButton(ilBiblFactoryFacadeInterface $bibl_factory_facade, ilBiblEntry $entry)
ilBiblLibraryInterface $library
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilBiblFactoryFacade $facade
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
generateLibraryLink(ilBiblEntry $entry, string $type)
formatAttribute(string $a, ilBiblTypeInterface $type, array $attributes, string $prefix)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getStringRepresentation()
__construct(\ilBiblLibraryInterface $library, \ilBiblFactoryFacade $facade)
ilBiblLibraryPresentationGUI constructor.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...