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 
28 use Closure;
29 use ILIAS\Data\URI;
30 
31 class Factory implements T\Factory
32 {
33  public function __construct(
34  protected SignalGeneratorInterface $signal_generator,
35  protected ViewControlFactory $view_control_factory,
36  protected ViewControlContainerFactory $view_control_container_factory,
37  protected DataFactory $data_factory,
38  protected Column\Factory $column_factory,
39  protected Action\Factory $action_factory,
40  protected \ArrayAccess $storage,
41  protected DataRowBuilder $data_row_builder,
42  protected OrderingRowBuilder $ordering_row_builder
43  ) {
44  }
45 
46  public function presentation(string $title, array $view_controls, Closure $row_mapping): Presentation
47  {
48  return new Presentation($title, $view_controls, $row_mapping, $this->signal_generator);
49  }
50 
51  public function data(
52  T\DataRetrieval $data_retrieval,
53  string $title,
54  array $columns,
55  ): Data {
56  return new Data(
57  $this->signal_generator,
58  $this->view_control_factory,
59  $this->view_control_container_factory,
60  $this->data_factory,
61  $this->data_row_builder,
62  $title,
63  $columns,
64  $data_retrieval,
65  $this->storage
66  );
67  }
68 
69  public function column(): Column\Factory
70  {
71  return $this->column_factory;
72  }
73 
74  public function action(): Action\Factory
75  {
76  return $this->action_factory;
77  }
78 
79  public function ordering(
80  T\OrderingRetrieval $ordering_retrieval,
81  URI $target_url,
82  string $title,
83  array $columns,
84  ): Ordering {
85  return new Ordering(
86  $this->signal_generator,
87  $this->view_control_factory,
88  $this->view_control_container_factory,
89  $this->ordering_row_builder,
90  $title,
91  $columns,
92  $ordering_retrieval,
93  $target_url,
94  $this->storage
95  );
96  }
97 }
presentation(string $title, array $view_controls, Closure $row_mapping)
description: purpose: > The Presentation Table lists some tabular data in a pleasant way...
Definition: Factory.php:46
ordering(T\OrderingRetrieval $ordering_retrieval, URI $target_url, string $title, array $columns,)
Definition: Factory.php:79
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Builds data types.
Definition: Factory.php:35
data(T\DataRetrieval $data_retrieval, string $title, array $columns,)
Definition: Factory.php:51
action()
description: purpose: > Consumers may attach Actions to the table; an Action is a Signal or URL carr...
Definition: Factory.php:74
__construct(protected SignalGeneratorInterface $signal_generator, protected ViewControlFactory $view_control_factory, protected ViewControlContainerFactory $view_control_container_factory, protected DataFactory $data_factory, protected Column\Factory $column_factory, protected Action\Factory $action_factory, protected \ArrayAccess $storage, protected DataRowBuilder $data_row_builder, protected OrderingRowBuilder $ordering_row_builder)
Definition: Factory.php:33
A Column describes the form of presentation for a certain aspect of data, i.e.
Definition: Column.php:27
column()
description: purpose: > Tables display data in a very structured way; Columns are essential in that ...
Definition: Factory.php:69