ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilJsLinkButton.php
Go to the documentation of this file.
1<?php
2
25{
26 protected string $target;
27
28 public static function getInstance(): self
29 {
30 return new self(self::TYPE_LINK);
31 }
32
33 public function setTarget(string $a_value): void
34 {
35 $this->target = trim($a_value);
36 }
37
38 public function getTarget(): string
39 {
40 return $this->target;
41 }
42
43 protected function renderCaption(): string
44 {
45 return '&nbsp;' . $this->getCaption() . '&nbsp;';
46 }
47
48 public function render(): string
49 {
50 $this->prepareRender();
51
52 $attr = array();
53
54 $attr["target"] = $this->getTarget();
55 $attr["name"] = $this->getName();
56 $attr["onclick"] = $this->getOnClick();
57
58 return '<a' . $this->renderAttributes($attr) . '>' .
59 $this->renderCaption() . '</a>';
60 }
61}
getCaption(bool $a_translate=true)
renderAttributes(?array $a_additional_attr=null)
Render current HTML attributes.
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...
setTarget(string $a_value)