19declare(strict_types=1);
41 protected UIFactory $ui_factory,
43 protected HTTPServices $http_services
50 self::TABLE_COL_LOGIN => $this->ui_factory->table()->column()->text(
51 $this->
lng->txt(self::LNG_TABLE_COL_LOGIN)
52 )->withHighlight(
true),
53 self::TABLE_COL_FIRSTNAME => $this->ui_factory->table()->column()->text(
54 $this->
lng->txt(self::LNG_TABLE_COL_FIRSTNAME)
56 self::TABLE_COL_LASTNAME => $this->ui_factory->table()->column()->text(
57 $this->
lng->txt(self::LNG_TABLE_COL_LASTNAME)
61 foreach ($this->data_retrieval->getAnswers() as $answer) {
62 $columns[self::TABLE_COL_ANSWER_PREFIX . (
int) ($answer[
"id"] ?? 0)] = $this->ui_factory->table()->column()->statusIcon(
63 (
string) ($answer[
"answer"] ??
'')
69 public function get(): DataTable
71 $title = $this->
lng->txt(
"poll_question") .
": \"" . $this->data_retrieval->getPollQuestion() .
"\"";
72 return $this->ui_factory->table()->data(
73 $this->data_retrieval,
76 )->withId(self::TABLE_ID)->withRequest($this->http_services->request());
Builds a Color from either hex- or rgb values.
const string TABLE_COL_LOGIN
__construct(protected DataRetrieval $data_retrieval, protected UIFactory $ui_factory, protected ilLanguage $lng, protected HTTPServices $http_services)
const string TABLE_COL_LASTNAME
const string LNG_TABLE_COL_LASTNAME
const string LNG_TABLE_COL_LOGIN
const string TABLE_COL_ANSWER_PREFIX
const string LNG_TABLE_COL_FIRSTNAME
const string TABLE_COL_FIRSTNAME
This describes a Data Table.