ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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
9
16{
18
20 protected $text = '';
21
23 protected $title = '';
24
29 public function __construct(string $text, string $title)
30 {
31 $this->checkStringArg('text', $text);
32 $this->checkStringArg('title', $title);
33 $this->text = $text;
34 $this->title = $title;
35 }
36
37
41 public function getTitle()
42 {
43 return $this->title;
44 }
45
49 public function getComponent()
50 {
51 return new Legacy($this->text);
52 }
53}
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.