N°931 integrate TagSet widget

This commit is contained in:
Pierre Goiffon
2018-09-12 09:03:14 +02:00
parent d1ee7f4353
commit d9315bec84
11 changed files with 3200 additions and 1935 deletions

View File

@@ -5964,18 +5964,11 @@ class AttributeTagSet extends AttributeDBFieldVoid
return ($val1 == $val2);
}
public function GetAllowedValues($aArgs = array(), $sContains = '')
{
$sAttCode = $this->GetCode();
$sClass = MetaModel::GetAttributeOrigin($this->GetHostClass(), $sAttCode);
$aAllowedTags = TagSetFieldData::GetAllowedValues($sClass, $sAttCode);
$aAllowedValues = array();
foreach($aAllowedTags as $oAllowedTag)
{
$aAllowedValues[$oAllowedTag->Get('tag_code')] = $oAllowedTag->Get('tag_label');
}
return $aAllowedValues;
}
public function GetAllowedValues($aArgs = array(), $sContains = '')
{
// The check is done when adding / removing tags, no need to have also this check here
return array();
}
/**
* @param array $aCols