Re-add getResourcesByType as simplified version

refs #5525
This commit is contained in:
Johannes Meyer 2014-07-25 08:58:50 +02:00
parent a6bd802e3e
commit 26d42da635
1 changed files with 17 additions and 0 deletions

View File

@ -79,4 +79,21 @@ class EditBackendForm extends Form
)
);
}
/**
* Return a list of all resources of the given type ready to be used as content for a select input
*
* @param string $type The type of resources to return
*
* @return array
*/
protected function getResourcesByType($type)
{
$backends = array();
foreach (array_keys(ResourceFactory::getResourceConfigs($type)->toArray()) as $name) {
$backends[$name] = $name;
}
return $backends;
}
}