mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
replace some entity shortcut by fqdn
* ChillPerson:Person * ChillMain:Center * ChillActivity:Activity
This commit is contained in:
@@ -43,7 +43,7 @@ class SetPasswordCommand extends Command
|
||||
public function _getUser($username)
|
||||
{
|
||||
return $this->entityManager
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->getRepository(\Chill\MainBundle\Entity\User::class)
|
||||
->findOneBy(['username' => $username]);
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ class CenterController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$center = $em->getRepository('ChillMainBundle:Center')->find($id);
|
||||
$center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id);
|
||||
|
||||
if (!$center) {
|
||||
throw $this->createNotFoundException('Unable to find Center entity.');
|
||||
@@ -75,7 +75,7 @@ class CenterController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entities = $em->getRepository('ChillMainBundle:Center')->findAll();
|
||||
$entities = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->findAll();
|
||||
|
||||
return $this->render('@ChillMain/Center/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -105,7 +105,7 @@ class CenterController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$center = $em->getRepository('ChillMainBundle:Center')->find($id);
|
||||
$center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id);
|
||||
|
||||
if (!$center) {
|
||||
throw $this->createNotFoundException('Unable to find Center entity.');
|
||||
@@ -125,7 +125,7 @@ class CenterController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$center = $em->getRepository('ChillMainBundle:Center')->find($id);
|
||||
$center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id);
|
||||
|
||||
if (!$center) {
|
||||
throw $this->createNotFoundException('Unable to find Center entity.');
|
||||
|
@@ -61,7 +61,7 @@ class UserController extends CRUDController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$user = $em->getRepository('ChillMainBundle:User')->find($uid);
|
||||
$user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid);
|
||||
|
||||
if (!$user) {
|
||||
throw $this->createNotFoundException('Unable to find User entity.');
|
||||
@@ -118,7 +118,7 @@ class UserController extends CRUDController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$user = $em->getRepository('ChillMainBundle:User')->find($uid);
|
||||
$user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid);
|
||||
|
||||
if (!$user) {
|
||||
throw $this->createNotFoundException('Unable to find User entity.');
|
||||
|
@@ -83,7 +83,7 @@ abstract class AbstractExportTest extends WebTestCase
|
||||
$em = static::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager');
|
||||
|
||||
$centers = $em->getRepository('ChillMainBundle:Center')
|
||||
$centers = $em->getRepository(\Chill\MainBundle\Entity\Center::class)
|
||||
->findAll();
|
||||
$circles = $em->getRepository('ChillMainBundle:Scope')
|
||||
->findAll();
|
||||
|
@@ -161,7 +161,7 @@ final class UserControllerTest extends WebTestCase
|
||||
|
||||
$user = self::$kernel->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->getRepository(\Chill\MainBundle\Entity\User::class)
|
||||
->findOneBy(['username' => $username]);
|
||||
|
||||
$this->assertTrue($passwordEncoder->isPasswordValid($user, $password));
|
||||
|
@@ -672,7 +672,7 @@ final class ExportManagerTest extends KernelTestCase
|
||||
$localUser = $user ?? self::$container->get(
|
||||
'doctrine.orm.entity_manager'
|
||||
)
|
||||
->getRepository('ChillMainBundle:User')
|
||||
->getRepository(\Chill\MainBundle\Entity\User::class)
|
||||
->findOneBy(['username' => 'center a_social']);
|
||||
$token = new UsernamePasswordToken($localUser, 'password', 'provider');
|
||||
$tokenStorage = new TokenStorage();
|
||||
|
Reference in New Issue
Block a user