public function importObjectRoutes()
{
foreach ($this->jarves->getBundles() as $bundleName => $bundle) {
if ($this->jarves->isJarvesBundle($bundleName)) {
if (!($config = $this->jarves->getConfig($bundleName))) {
continue;
}
if ($objects = $config->getObjects()) {
foreach ($objects as $object) {
if ($object->isExcludeFromREST()) {
continue;
}
$objectName = $config->getName() . '/' . lcfirst($object->getId());
$pattern = '%jarves_admin_prefix%/object/' . $objectName;
$this->setupRoutes($config, $object->getFinalApiController(), $pattern, $object->getKey(), $object);
//maybe in v1.1
//$this->setupRelationRoutes($pattern, $object);
}
}
}
}
}