ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\BookingManager\BookingProcess\SlotGUI Class Reference
+ Collaboration diagram for ILIAS\BookingManager\BookingProcess\SlotGUI:

Public Member Functions

 __construct (string $link, string $from, string $to, int $from_ts, int $to_ts, string $title, int $available, int $color_nr)
 
 render ()
 

Protected Attributes

int $color_nr
 
 $from
 
string $to
 
int $from_ts
 
int $to_ts
 
string $title
 
int $available
 
string $link
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.SlotGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\BookingManager\BookingProcess\SlotGUI::__construct ( string  $link,
string  $from,
string  $to,
int  $from_ts,
int  $to_ts,
string  $title,
int  $available,
int  $color_nr 
)

Definition at line 34 of file class.SlotGUI.php.

References ILIAS\BookingManager\BookingProcess\SlotGUI\$available, ILIAS\BookingManager\BookingProcess\SlotGUI\$color_nr, ILIAS\BookingManager\BookingProcess\SlotGUI\$from, ILIAS\BookingManager\BookingProcess\SlotGUI\$from_ts, ILIAS\BookingManager\BookingProcess\SlotGUI\$link, ILIAS\BookingManager\BookingProcess\SlotGUI\$title, ILIAS\BookingManager\BookingProcess\SlotGUI\$to, ILIAS\BookingManager\BookingProcess\SlotGUI\$to_ts, ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), ILIAS\Repository\link(), and ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\to().

43  {
44  $this->from = $from;
45  $this->to = $to;
46  $this->from_ts = $from_ts;
47  $this->to_ts = $to_ts;
48  $this->title = $title;
49  $this->available = $available;
50  $this->link = $link;
51  $this->color_nr = $color_nr;
52  }
to(\GdImage $image, int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
link(string $caption, string $href, bool $new_viewport=false)
+ Here is the call graph for this function:

Member Function Documentation

◆ render()

ILIAS\BookingManager\BookingProcess\SlotGUI::render ( )

Definition at line 54 of file class.SlotGUI.php.

References $DIC, $url, ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\from(), ILIAS\Repository\link(), and ILIAS\ResourceStorage\Flavour\Machine\DefaultMachines\to().

54  : string
55  {
56  global $DIC;
57  $ui = $DIC->ui();
58  $tpl = new \ilTemplate("tpl.slot.html", true, true, "Modules/BookingManager/BookingProcess");
59 
60  $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy(""));
61  $url = $this->link . '&replaceSignal=' . $modal->getReplaceSignal()->getId();
62  $modal = $modal->withAsyncRenderUrl($url);
63  $button = $ui->factory()->button()->shy($this->title, "#")
64  ->withOnClick($modal->getShowSignal());
65 
66  $tpl->setVariable("OBJECT_LINK", $ui->renderer()->render([$button, $modal]));
67  $tpl->setVariable("TIME", $this->from . "-" . $this->to);
68  $tpl->setVariable("COLOR_NR", $this->color_nr);
69  $tpl->setVariable("AVAILABILITY", "(" . $this->available . ") ");
70 
71  return $tpl->get();
72  }
global $DIC
Definition: feed.php:28
$url
Definition: ltiregstart.php:35
to(\GdImage $image, int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
link(string $caption, string $href, bool $new_viewport=false)
+ Here is the call graph for this function:

Field Documentation

◆ $available

int ILIAS\BookingManager\BookingProcess\SlotGUI::$available
protected

◆ $color_nr

int ILIAS\BookingManager\BookingProcess\SlotGUI::$color_nr
protected

◆ $from

ILIAS\BookingManager\BookingProcess\SlotGUI::$from
protected

◆ $from_ts

int ILIAS\BookingManager\BookingProcess\SlotGUI::$from_ts
protected

◆ $link

string ILIAS\BookingManager\BookingProcess\SlotGUI::$link
protected

◆ $title

string ILIAS\BookingManager\BookingProcess\SlotGUI::$title
protected

◆ $to

string ILIAS\BookingManager\BookingProcess\SlotGUI::$to
protected

◆ $to_ts

int ILIAS\BookingManager\BookingProcess\SlotGUI::$to_ts
protected

The documentation for this class was generated from the following file: