19declare(strict_types=1);
38 protected const string TABLE_ID =
'pllnswrtbl';
42 protected UIFactory $ui_factory,
44 protected HTTPServices $http_services
51 self::TABLE_COL_ORDER => $this->ui_factory->table()->column()->number(
52 $this->
lng->txt(self::LNG_TABLE_COL_ORDER)
54 self::TABLE_COL_ANSWER => $this->ui_factory->table()->column()->text(
55 $this->
lng->txt(self::LNG_TABLE_COL_ANSWER)
56 )->withHighlight(
true),
57 self::TABLE_COL_CURRENT_VOTES => $this->ui_factory->table()->column()->number(
58 $this->
lng->txt(self::LNG_TABLE_COL_CURRENT_VOTES)
60 self::TABLE_COL_CURRENT_PERCENTAGE => $this->ui_factory->table()->column()->number(
61 $this->
lng->txt(self::LNG_TABLE_COL_CURRENT_PERCENTAGE)
67 public function get(): DataTable
69 $title = $this->
lng->txt(
"poll_question") .
": \"" . $this->data_retrieval->getQuestion() .
"\"";
70 return $this->ui_factory->table()->data(
71 $this->data_retrieval,
74 )->withId(self::TABLE_ID)->withRequest($this->http_services->request());
Builds a Color from either hex- or rgb values.
const string TABLE_COL_CURRENT_PERCENTAGE
const string LNG_TABLE_COL_CURRENT_VOTES
const string LNG_TABLE_COL_CURRENT_PERCENTAGE
const string TABLE_COL_CURRENT_VOTES
const string LNG_TABLE_COL_ANSWER
const string LNG_TABLE_COL_ORDER
const string TABLE_COL_ANSWER
__construct(protected DataRetrieval $data_retrieval, protected UIFactory $ui_factory, protected ilLanguage $lng, protected HTTPServices $http_services)
const string TABLE_COL_ORDER
This describes a Data Table.