ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 28 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 39 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().

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

Member Function Documentation

◆ render()

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

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

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

59  : string
60  {
61  global $DIC;
62  $ui = $DIC->ui();
63  $tpl = new \ilTemplate("tpl.slot.html", true, true, "components/ILIAS/BookingManager/BookingProcess");
64 
65  $modal = $ui->factory()->modal()->roundtrip("", $ui->factory()->legacy()->content(""));
66  $url = $this->link . '&replaceSignal=' . $modal->getReplaceSignal()->getId();
67  $modal = $modal->withAsyncRenderUrl($url);
68  $button = $ui->factory()->button()->shy($this->title, "#")
69  ->withOnClick($modal->getShowSignal());
70 
71  $tpl->setVariable("OBJECT_LINK", $ui->renderer()->render([$button, $modal]));
72  $tpl->setVariable("TIME", $this->from . "-" . $this->to);
73  $tpl->setVariable("COLOR_NR", $this->color_nr);
74  $tpl->setVariable("AVAILABILITY", "(" . $this->available . ") ");
75 
76  return $tpl->get();
77  }
$url
Definition: shib_logout.php:66
global $DIC
Definition: shib_login.php:22
link(string $caption, string $href, bool $new_viewport=false)
to(\GdImage $image, ?int $quality=null)
Currently this is the only way to make a FileStream from a GD image resource.
+ 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: