replace more doctrine shortcuts by fqdn

This commit is contained in:
2022-04-30 00:35:11 +02:00
parent a0392b9216
commit 864e1eeabb
19 changed files with 39 additions and 33 deletions

View File

@@ -87,7 +87,7 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id);
$permissionsGroup = $em->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)->find($id);
if (!$permissionsGroup) {
throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
@@ -203,8 +203,8 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($pgid);
$roleScope = $em->getRepository('ChillMainBundle:RoleScope')->find($rsid);
$permissionsGroup = $em->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)->find($pgid);
$roleScope = $em->getRepository(\Chill\MainBundle\Entity\RoleScope::class)->find($rsid);
if (!$permissionsGroup) {
throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
@@ -269,7 +269,7 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id);
$permissionsGroup = $em->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)->find($id);
if (!$permissionsGroup) {
throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
@@ -319,7 +319,7 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillMainBundle:PermissionsGroup')->findAll();
$entities = $em->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)->findAll();
return $this->render('@ChillMain/PermissionsGroup/index.html.twig', [
'entities' => $entities,
@@ -349,7 +349,7 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id);
$permissionsGroup = $em->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)->find($id);
if (!$permissionsGroup) {
throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
@@ -405,7 +405,7 @@ class PermissionsGroupController extends AbstractController
$em = $this->getDoctrine()->getManager();
$permissionsGroup = $em
->getRepository('ChillMainBundle:PermissionsGroup')
->getRepository(\Chill\MainBundle\Entity\PermissionsGroup::class)
->find($id);
if (!$permissionsGroup) {
@@ -469,7 +469,7 @@ class PermissionsGroupController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$roleScope = $em->getRepository('ChillMainBundle:RoleScope')
$roleScope = $em->getRepository(\Chill\MainBundle\Entity\RoleScope::class)
->findOneBy(['role' => $role, 'scope' => $scope]);
if (null === $roleScope) {

View File

@@ -54,7 +54,7 @@ class ScopeController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$scope = $em->getRepository('ChillMainBundle:Scope')->find($id);
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
if (!$scope) {
throw $this->createNotFoundException('Unable to find Scope entity.');
@@ -75,7 +75,7 @@ class ScopeController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$entities = $em->getRepository('ChillMainBundle:Scope')->findAll();
$entities = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->findAll();
return $this->render('@ChillMain/Scope/index.html.twig', [
'entities' => $entities,
@@ -105,7 +105,7 @@ class ScopeController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$scope = $em->getRepository('ChillMainBundle:Scope')->find($id);
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
if (!$scope) {
throw $this->createNotFoundException('Unable to find Scope entity.');
@@ -125,7 +125,7 @@ class ScopeController extends AbstractController
{
$em = $this->getDoctrine()->getManager();
$scope = $em->getRepository('ChillMainBundle:Scope')->find($id);
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
if (!$scope) {
throw $this->createNotFoundException('Unable to find Scope entity.');

View File

@@ -124,7 +124,7 @@ class UserController extends CRUDController
throw $this->createNotFoundException('Unable to find User entity.');
}
$groupCenter = $em->getRepository('ChillMainBundle:GroupCenter')
$groupCenter = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class)
->find($gcid);
if (!$groupCenter) {
@@ -330,7 +330,7 @@ class UserController extends CRUDController
{
$em = $this->getDoctrine()->getManager();
$groupCenterManaged = $em->getRepository('ChillMainBundle:GroupCenter')
$groupCenterManaged = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class)
->findOneBy([
'center' => $groupCenter->getCenter(),
'permissionsGroup' => $groupCenter->getPermissionsGroup(),