ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
31 
32 class Factory implements M\Factory
33 {
34  public function __construct(
35  protected SignalGeneratorInterface $signal_generator,
36  protected InterruptiveItem\Factory $item_factory,
37  protected FieldFactory $field_factory,
38  ) {
39  }
40 
41  public function interruptive(string $title, string $message, string $form_action): Interruptive
42  {
43  return new Interruptive($title, $message, $form_action, $this->signal_generator);
44  }
45 
47  {
48  return $this->item_factory;
49  }
50 
51  public function roundtrip(string $title, Component\Component|array|null $content, array $inputs = [], ?string $post_url = null): RoundTrip
52  {
53  return new RoundTrip(
54  $this->signal_generator,
55  $this->field_factory,
56  new FormInputNameSource(),
57  $title,
58  $content,
59  $inputs,
60  $post_url
61  );
62  }
63 
64  public function lightbox($pages): Lightbox
65  {
66  return new Lightbox($pages, $this->signal_generator);
67  }
68 
69  public function lightboxImagePage(Image $image, string $title, string $description = ''): LightboxImagePage
70  {
71  return new LightboxImagePage($image, $title, $description);
72  }
73 
74  public function lightboxTextPage(string $text, string $title): LightboxTextPage
75  {
76  return new LightboxTextPage($text, $title);
77  }
78 
79  public function lightboxCardPage(Card $card): LightboxCardPage
80  {
81  return new LightboxCardPage($card);
82  }
83 }
lightboxTextPage(string $text, string $title)
description: purpose: > A Lightbox text page represents a document like content/text inside a Lightb...
Definition: Factory.php:74
Builds a Color from either hex- or rgb values.
Definition: Factory.php:30
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
roundtrip(string $title, Component\Component|array|null $content, array $inputs=[], ?string $post_url=null)
description: purpose: > Round-Trip modals are to be used if the context would be lost by performing ...
Definition: Factory.php:51
FormInputNameSource is responsible for generating continuous form input names.
interruptiveItem()
description: purpose: > Interruptive items are displayed in an Interruptive modal and represent the ...
Definition: Factory.php:46
lightboxCardPage(Card $card)
description: purpose: > A lightbox card page shows a card as a Lightbox modal.
Definition: Factory.php:79
$message
Definition: xapiexit.php:31
__construct(protected SignalGeneratorInterface $signal_generator, protected InterruptiveItem\Factory $item_factory, protected FieldFactory $field_factory,)
Definition: Factory.php:34
interruptive(string $title, string $message, string $form_action)
description: purpose: > An Interruptive modal disrupts the user in critical situation, forcing him or her to focus on the task at hand.
Definition: Factory.php:41
lightbox($pages)
description: purpose: > The Lightbox modal displays media data such as images or videos...
Definition: Factory.php:64
lightboxImagePage(Image $image, string $title, string $description='')
description: purpose: > A Lightbox image page represents an image inside a Lightbox modal...
Definition: Factory.php:69