N°3190 - Edit n:n LinkedSetIndirect in object details using a tagset-like widget

- Add generic set block ui component
- Add model link set (direct and indirect) attribute (display style)
- Add model link set direct allowed values
- Create link set viewer block UI (BlockLinksSetDisplayAsProperty)
- Add set block ui factory for linkset
- Add object factory and create new endpoint in object controller (with data binder)
- Add link set model, link set repository and link set data transformer services
This commit is contained in:
bdalsass
2023-01-24 10:03:10 +01:00
committed by GitHub
parent 9482139b5a
commit fb1ceebaa4
55 changed files with 3948 additions and 234 deletions

View File

@@ -60,16 +60,20 @@ class WizardHelper
// special handling for lists
// assumes this is handled as an array of objects
// thus encoded in json like: [ { name:'link1', 'id': 123}, { name:'link2', 'id': 124}...]
$aData = json_decode($value, true); // true means decode as a hash array (not an object)
if (!is_array($value)) {
$aData = json_decode($value, true); // true means decode as a hash array (not an object)
} else {
$aData = $value;
}
// Check what are the meaningful attributes
$aFields = $this->GetLinkedWizardStructure($oAttDef);
$sLinkedClass = $oAttDef->GetLinkedClass();
$aLinkedObjectsArray = array();
if (!is_array($aData))
{
echo ("aData: '$aData' (value: '$value')\n");
if (!is_array($aData)) {
echo("aData: '$aData' (value: '$value')\n");
}
foreach($aData as $aLinkedObject)
foreach ($aData as $aLinkedObject)
{
$oLinkedObj = MetaModel::NewObject($sLinkedClass);
foreach($aFields as $sLinkedAttCode)