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

@@ -127,7 +127,7 @@ class BlockDirectLinksEditTable extends UIContentBlock
*
* @return void
*/
public function InitTable(\WebPage $oPage, \DBObjectSet $oValue, string $sFormPrefix)
public function InitTable(\WebPage $oPage, $oValue, string $sFormPrefix)
{
/** @todo fields initialization */
$this->sInputName = $sFormPrefix.'attr_'.$this->oUILinksDirectWidget->GetAttCode();
@@ -193,26 +193,6 @@ class BlockDirectLinksEditTable extends UIContentBlock
$aRow['form::select'] = '<input type="checkbox" class="selectList'.$this->oUILinksDirectWidget->GetInputId().'" onClick="oWidget'.$this->oUILinksDirectWidget->GetInputId().'.directlinks(\'instance\')._onSelectChange();" value="'.$oLinkObj->GetKey().'"/>';
foreach ($this->oUILinksDirectWidget->GetZList() as $sLinkedAttCode) {
$aRow[$sLinkedAttCode] = $oLinkObj->GetAsHTML($sLinkedAttCode);
// tentative d'ajout des attributs en édition
// $sValue = $oLinkObj->Get($sLinkedAttCode);
// $sDisplayValue = $oLinkObj->GetEditValue($sLinkedAttCode);
// $oAttDef = MetaModel::GetAttributeDef($this->oUILinksDirectWidget->GetLinkedClass(), $sLinkedAttCode);
//
// $aRow[$sLinkedAttCode] = '<div class="field_container" style="border:none;"><div class="field_data"><div class="field_value">'
// .\cmdbAbstractObject::GetFormElementForField(
// $oPage,
// $this->oUILinksDirectWidget->GetLinkedClass(),
// $sLinkedAttCode,
// $oAttDef,
// $sValue,
// $sDisplayValue,
// $this->GetFieldId($oValue, $sLinkedAttCode),
// ']',
// 0,
// []
// )
// .'</div></div></div>';
}
$aRows[] = $aRow;
}