ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
SubObjectModes.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use ILIAS\Data\Factory as DataFactory;
28
30{
31 protected Container $dic;
32
33 protected string $type;
34 protected int $ref_id;
35
39 protected array $sub_types;
40
41 public function __construct(
43 string $type,
44 int $ref_id,
45 string ...$sub_types
46 ) {
47 $this->dic = $dic;
48 $this->type = $type;
49 $this->ref_id = $ref_id;
50 $this->sub_types = $sub_types;
51 }
52 public function inDataTable(): DataTable\SupplierInterface
53 {
54 return new DataTable\Supplier(
55 $this->dic->user(),
56 $this->dic->ui()->factory(),
57 new DataFactory(),
58 $this->dic['static_url'],
59 $this->type,
60 $this->ref_id,
61 ...$this->sub_types
62 );
63 }
64
65 public function inFilter(): Filter\SupplierInterface
66 {
67 return new Filter\Supplier(
68 $this->dic->user(),
69 $this->dic->language(),
70 $this->dic->ui()->factory(),
71 new DataFactory(),
72 $this->dic['static_url'],
73 $this->type,
74 $this->ref_id,
75 ...$this->sub_types
76 );
77 }
78}
__construct(Container $dic, string $type, int $ref_id, string ... $sub_types)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Builds data types.
Definition: Factory.php:36