diff options
| author | Rasmus Fuhse <fuhse@data-quest.de> | 2023-07-13 13:14:56 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2023-07-13 13:14:56 +0000 |
| commit | 74603117e50e764dfb0233d49cb99ffafaccac54 (patch) | |
| tree | 6dda9ee2c02a06a275d76aa05619eb6402176f18 /lib/classes/forms/Part.php | |
| parent | 578284e2ee4d8c8f2901b26abcb3efd440b9ad7f (diff) | |
Resolve "Restrukturierung der Veranstaltungsverwaltung inklusive Mehr-Seite"
Closes #2440
Merge request studip/studip!1695
Diffstat (limited to 'lib/classes/forms/Part.php')
| -rw-r--r-- | lib/classes/forms/Part.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/classes/forms/Part.php b/lib/classes/forms/Part.php index 3609eb4..1d1c9d0 100644 --- a/lib/classes/forms/Part.php +++ b/lib/classes/forms/Part.php @@ -67,13 +67,13 @@ abstract class Part /** * Adds an Input to this Part. * @param Input $input - * @return Input + * @return $this */ public function addInput(Input $input) { $input->setParent($this); $this->parts[] = $input; - return $input; + return $this; } /** @@ -81,15 +81,15 @@ abstract class Part * * @param string $text The text to be added. * @param bool $text_is_html Whether the text is HTML (true) or plain text (false). Defaults to true. - * @return Text The added text form part. + * @return $this */ - public function addText(string $text, bool $text_is_html = true): Text + public function addText(string $text, bool $text_is_html = true) { $text_part = new Text(); $text_part->setText($text, $text_is_html); $text_part->setParent($this); $this->parts[] = $text_part; - return $text_part; + return $this; } /** @@ -100,16 +100,16 @@ abstract class Part * @param \Icon|null $icon The icon to be used for the link. * @param array $attributes Additional link attributes. * - * @return Link The Text form element containing the link as HTML. + * @return $this */ - public function addLink(string $title, string $url, ?\Icon $icon = null, array $attributes = []): Link + public function addLink(string $title, string $url, ?\Icon $icon = null, array $attributes = []) { $link = new Link($url, $title, $icon); $link->setAttributes($attributes); $this->addPart($link); - return $link; + return $this; } /** |
