ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ContainerFilterTableBuilder.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Container\Filter;
22 
28 
29 class ContainerFilterTableBuilder extends CommonTableBuilder
30 {
31  public function __construct(
32  protected InternalDomainService $domain,
33  protected InternalGUIService $gui,
34  protected \ilContainerFilterService $container_filter_service,
35  protected int $ref_id,
36  object $parent_gui,
37  string $parent_cmd
38  ) {
39  parent::__construct($parent_gui, $parent_cmd);
40  }
41 
42  protected function getId(): string
43  {
44  return "cont_filter";
45  }
46 
47  protected function getTitle(): string
48  {
49  return "";
50  }
51 
52  protected function getRetrieval(): RetrievalInterface
53  {
54  return $this->domain->containerFilterRetrieval(
55  $this->container_filter_service,
56  $this->ref_id
57  );
58  }
59 
60  protected function transformRow(array $data_row): array
61  {
62  return [
63  "record_set_id" => $data_row["record_set_id"],
64  "record_title" => $data_row["record_title"],
65  "field_title" => $data_row["field_title"],
66  ];
67  }
68 
69  protected function build(TableAdapterGUI $table): TableAdapterGUI
70  {
71  $lng = $this->domain->lng();
72 
73  return $table
74  ->textColumn("record_title", $lng->txt("cont_filter_record"))
75  ->textColumn("field_title", $lng->txt("cont_filter_field"));
76  }
77 }
$ref_id
Definition: ltiauth.php:65
__construct(Container $dic, ilPlugin $plugin)
global $lng
Definition: privfeed.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(protected InternalDomainService $domain, protected InternalGUIService $gui, protected \ilContainerFilterService $container_filter_service, protected int $ref_id, object $parent_gui, string $parent_cmd)