= $y["situation_id"]);});
$data = sql_delete($data, ["situation_id", "id"]);
$data = sql_rename($data, "name", "situation_name");
}
*/
{
$data = sql_cross($data, $data_adpositions["words"]);
$data = sql_select($data, function ($row) {return ($row["situation_id"] == $row["id"]);});
$data = sql_delete($data, ["situation_id", "id"]);
$data = sql_rename($data, "name", "situation_name");
}
{
$data = sql_cross($data, $data_adpositions["types"]);
$data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);});
$data = sql_delete($data, ["type_id", "id"]);
$data = sql_rename($data, "name", "type_name");
}
{
$data = sql_cross($data, $data_adpositions["references"]);
$data = sql_select($data, function ($row) {return ($row["reference_id"] == $row["id"]);});
$data = sql_delete($data, ["reference_id", "id"]);
$data = sql_rename($data, "name", "reference_name");
}
}
$table = new class_table
(
[
new class_column("Language", "language_id"),
new class_column("Situation", "situation_name"),
new class_column("Type", "type_name"),
new class_column("Reference", "reference_name"),
new class_column("Words", "words", function ($x) {return json_encode($x);}),
],
$data
);
$table_ = $table->snap
(
[
"label_vertical" => function ($column) {return "";},
"columns_vertical" =>
[
$table->columns_get()[1],
],
"label_horizontal" => function ($column, $value) {return $value;},
"columns_horizontal" =>
[
$table->columns_get()[2],
$table->columns_get()[3],
],
"columns_data" =>
[
$table->columns_get()[0],
$table->columns_get()[4],
],
"data_aggregator" => function ($values)
{
return $values;
},
"data_formatter" => function_chain
(
[
object_from_array("language_id"),
object_map(object_attribute("words")),
format_correlation("type_word"),
]
),
]
);
$table_->generate();
?>
["Ek skal varte foran."], "eng" => ["I will wait in front."]])); ?>
["Du mut blive bakan."], "eng" => ["You must stay in the back."]])); ?>
["Han sta nedan de brüg."], "eng" => ["He stands under the bridge."]])); ?>
["Hun flüg uvan de volker."], "eng" => ["She flies above the clouds."]])); ?>
["Vi kan gae in de timer."], "eng" => ["We can go into the room."]])); ?>
["Je skal löpe ut de hus."], "eng" => ["You shall run out of the house."]])); ?>