entity maanger reset to defaults

This commit is contained in:
yuri
2018-05-04 13:58:40 +03:00
parent 50493cf725
commit 8229b8320f
3 changed files with 115 additions and 29 deletions
@@ -335,4 +335,16 @@ class EntityManager extends \Espo\Core\Controllers\Base
return true;
}
public function postActionResetToDefault($params, $data, $request)
{
if (empty($data->scope)) {
throw new BadRequest();
}
$this->getContainer()->get('entityManagerUtil')->resetToDefaults($data->scope);
$this->getContainer()->get('dataManager')->clearCache();
return true;
}
}