ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LightboxImagePage.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
27 
37 {
38  use ComponentHelper;
39 
40  protected Image $image;
41  protected string $title;
42  protected string $description;
43 
44  public function __construct(Image $image, string $title, string $description = '')
45  {
46  $this->image = $image;
47  $this->title = $title;
48  $this->description = $description;
49  }
50 
54  public function getTitle(): string
55  {
56  return $this->title;
57  }
58 
62  public function getDescription(): string
63  {
64  return $this->description ?: $this->image->getAlt();
65  }
66 
70  public function getComponent(): Image
71  {
72  return $this->image;
73  }
74 }
getTitle()
Get the title of this page, displayed as title in the lightbox modal.
getDescription()
Get the description of this page, displayed along with the media item.
__construct(Image $image, string $title, string $description='')
getComponent()
Get the component representing the media item to be displayed in the modals content section...