ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
LightboxTextPage.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5
10
17{
19
21 protected $text = '';
22
24 protected $title = '';
25
30 public function __construct(string $text, string $title)
31 {
32 $this->checkStringArg('text', $text);
33 $this->checkStringArg('title', $title);
34 $this->text = $text;
35 $this->title = $title;
36 }
37
38
42 public function getTitle()
43 {
44 return $this->title;
45 }
46
50 public function getComponent()
51 {
52 return new Legacy($this->text, new SignalGenerator());
53 }
54}
An exception for terminatinating execution or to throw for unit testing.
getTitle()
Get the title of this page, displayed as title in the lightbox modal.string
getComponent()
Get the component representing the media item to be displayed in the modals content section,...
checkStringArg($which, $value)
Throw an InvalidArgumentException if $value is no string.
trait ComponentHelper
Provides common functionality for component implementations.