5 $f = $DIC->ui()->factory();
6 $renderer = $DIC->ui()->renderer();
9 $actions = array(
"Alle" =>
"#",
"Mehr als 5 Antworten" =>
"#");
10 $aria_label =
"filter entries";
11 $view_controls = array(
12 $f->viewControl()->mode($actions, $aria_label)->withActive(
"Alle")
15 $mapping_closure =
function (
$row, $record, $ui_factory, $environment) {
17 ->withHeadline($record[
'question_title'])
18 ->withSubheadline($record[
'question_txt'])
19 ->withImportantFields(
22 'Beantwortet: ' => $record[
'stats'][
'total'],
23 'Häufigste Antwort: ' => $record[
'answers'][$record[
'stats'][
'most_common']][
'title']
27 $ui_factory->listing()->descriptive(
29 'Werte' => $environment[
'totals']($record[
'answers']),
30 'Chart' => $environment[
'chart']($record[
'answers']),
34 ->withFurtherFieldsHeadline($record[
'type'])
37 'Beantwortet: ' => $record[
'stats'][
'total'],
38 'Übersprungen' => $record[
'stats'][
'skipped'],
39 'Häufigste Antwort: ' => $record[
'answers'][$record[
'stats'][
'most_common']][
'title'],
40 'Anzahl Häufigste: ' => $record[
'stats'][
'most_common_total'],
41 'Median: ' => $record[
'answers'][$record[
'stats'][
'median']][
'title']
44 ->withAction($ui_factory->button()->standard(
'zur Frage',
'#'));
49 require(
'environment.php');
51 $ptable =
$f->table()->presentation(
59 require(
'included_data1.php');
63 return $renderer->render($ptable->withData(
$data));