Return data list name

Return the data list name instead of the id for the function
getDatalistName().

refs #621
This commit is contained in:
Tobias von der Krone 2017-02-17 20:55:33 +01:00 committed by Thomas Gelf
parent 592b8cb98e
commit fd53224a58
1 changed files with 11 additions and 2 deletions

View File

@ -65,8 +65,17 @@ class PropertyModifierMap extends PropertyModifierHook
protected function getDatalistName()
{
// TODO: need the db for ->enumDatalist()
return sprintf('List with id %s', $this->getSetting('datalist'));
$db = $this->getDb()->getDbAdapter();
$query = $db->select()->from(
'director_datalist',
'list_name'
)->where(
'id = ?',
$this->getSetting('datalist_id')
);
$result = $db->fetchOne($query);
return $result;
}
protected function loadCache($force = false)