[skip ci]

PHRAS-3381_tx-as-classification-plan_MASTER
back controller for ok button
fix : PHRAS-3383
WIP
This commit is contained in:
jygaulier
2021-03-11 20:10:49 +01:00
parent 92df433af0
commit a76f64e892
10 changed files with 482 additions and 63 deletions

View File

@@ -30,15 +30,24 @@ class ThesaurusController extends Controller
{
$sbas_id = $request->get('sbas_id');
$tx_term_id = $request->get('tx_term_id');
$records = RecordsRequest::fromRequest($this->app, $request, RecordsRequest::FLATTEN_YES_PRESERVE_STORIES, [ACL::CANMODIFRECORD]);
// array of sbid/rid. too bad we cannot array_map on arraycollection
$recRefs = [];
foreach($records as $r) {
$recRefs[] = [
'sbas_id'=>$r->getDataboxId(),
'record_id'=>$r->getRecordId()
];
}
// twig parameters
$twp = [
'error' => null,
'dlg_level' => $request->get('dlg_level'),
// 'fields' => [], // fields the can receive the value
// 'fvalue' => 'Europe',
'lst' => $records->serializedList(),
// 'lst' => $records->serializedList(),
'records' => $recRefs,
'received_cnt' => $records->received()->count(),
'rejected_cnt' => $records->rejected()->count(),
'up_paths' => [],