This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/view/events/image_info_box_building_event.php
2019-09-29 14:30:55 +01:00

25 lines
516 B
PHP

<?php
class ImageInfoBoxBuildingEvent extends Event
{
/** @var array */
public $parts = [];
/** @var Image */
public $image;
/** @var User */
public $user;
public function __construct(Image $image, User $user)
{
$this->image = $image;
$this->user = $user;
}
public function add_part(string $html, int $position=50)
{
while (isset($this->parts[$position])) {
$position++;
}
$this->parts[$position] = $html;
}
}