N°5904 - Use attribute linked set edit mode to enable actions in view (improvement)

This commit is contained in:
bdalsass
2023-02-08 14:34:46 +01:00
committed by GitHub
parent 372888c7a7
commit 86a208a86d
8 changed files with 160 additions and 171 deletions

View File

@@ -74,37 +74,4 @@ class LinkSetModel
}
/**
* Convert edit_mode to relation type.
*
* @return string|null
*/
static public function ConvertEditModeToRelationType(AttributeLinkedSet $oAttDef): ?string
{
switch ($oAttDef->GetEditMode()) {
case LINKSET_EDITMODE_INPLACE:
return LINKSET_RELATIONTYPE_PROPERTY;
case LINKSET_EDITMODE_ADDREMOVE:
return LINKSET_RELATIONTYPE_LINK;
default:
return null;
}
}
/**
* Convert edit_mode to read only.
*
* @return bool
*/
static public function ConvertEditModeToReadOnly(AttributeLinkedSet $oAttDef): bool
{
switch ($oAttDef->GetEditMode()) {
case LINKSET_EDITMODE_NONE:
case LINKSET_EDITMODE_ADDONLY:
return true;
default:
return false;
}
}
}