public function getDatasourcesAsArray()
{
// initialize the array
$datasources = array();
// prepare the array with the datasources
foreach ($this->getDatasources() as $datasource) {
$datasources[$datasource->getPrimaryKey()] = $datasource;
}
// return the array with the datasources
return $datasources;
}