mvc/model - implement getDescription() in NetworkAliasField. As this field type acts as a single (non-list) type, we need to return the description from here as well as BaseListField's implementation doesn't apply here.

This commit is contained in:
Ad Schellevis 2024-04-25 15:45:50 +02:00
parent b139e33e4c
commit 697992bb53

View File

@ -103,6 +103,18 @@ class NetworkAliasField extends BaseListField
throw new \Exception("Unsupported feature setMultiple()");
}
/**
* {@inheritdoc}
*/
public function getDescription()
{
if (isset($this->internalOptionList[(string)$this])) {
return $this->internalOptionList[(string)$this];
}
return (string)$this;
}
/**
* retrieve field validators for this field type
* @return array