N°2508 - Include Obsolescence icon within list and autocomplete - case of search filters

This commit is contained in:
acognet
2021-01-08 09:48:35 +01:00
parent 354fc1949b
commit 06ecfb5814
3 changed files with 40 additions and 14 deletions

View File

@@ -1114,13 +1114,13 @@ abstract class AttributeDefinition
}
/**
* @param array $aArgs
* @param string $sContains
*
* @return array|null
* @throws \CoreException
* @throws \OQLException
*/
* @param array $aArgs
* @param string $sContains
*
* @return array|null
* @throws \CoreException
* @throws \OQLException
*/
public function GetAllowedValues($aArgs = array(), $sContains = '')
{
$oValSetDef = $this->GetValuesDef();
@@ -1132,6 +1132,20 @@ abstract class AttributeDefinition
return $oValSetDef->GetValues($aArgs, $sContains);
}
/**
* GetAllowedValuesForSelect is the same as GetAllowedValues except for field with obsolescence flag
* @param array $aArgs
* @param string $sContains
*
* @return array|null
* @throws \CoreException
* @throws \OQLException
*/
public function GetAllowedValuesForSelect($aArgs = array(), $sContains = '')
{
return $this->GetAllowedValues($aArgs, $sContains);
}
/**
* Explain the change of the attribute (history)
*
@@ -6643,6 +6657,14 @@ class AttributeExternalKey extends AttributeDBFieldVoid
}
}
public function GetAllowedValuesForSelect($aArgs = array(), $sContains = '')
{
//$this->GetValuesDef();
$oValSetDef = new ValueSetObjects('SELECT '.$this->GetTargetClass());
return $oValSetDef->GetValuesForAutocomplete($aArgs, $sContains);
}
public function GetAllowedValuesAsObjectSet($aArgs = array(), $sContains = '', $iAdditionalValue = null)
{
$oValSetDef = $this->GetValuesDef();