mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
use fqcn in getRepository method
This commit is contained in:
parent
0d05865091
commit
1eeee615a3
@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
|
|
||||||
use Chill\CustomFieldsBundle\Entity\CustomField;
|
use Chill\CustomFieldsBundle\Entity\CustomField;
|
||||||
|
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
|
||||||
use Chill\CustomFieldsBundle\Form\CustomFieldType;
|
use Chill\CustomFieldsBundle\Form\CustomFieldType;
|
||||||
|
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ class CustomFieldController extends Controller
|
|||||||
|
|
||||||
if ($cfGroupId !== null) {
|
if ($cfGroupId !== null) {
|
||||||
$cfGroup = $this->getDoctrine()->getManager()
|
$cfGroup = $this->getDoctrine()->getManager()
|
||||||
->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')
|
->getRepository(CustomFieldsGroup::class)
|
||||||
->find($cfGroupId);
|
->find($cfGroupId);
|
||||||
if (!$cfGroup) {
|
if (!$cfGroup) {
|
||||||
throw $this->createNotFoundException('CustomFieldsGroup with id '
|
throw $this->createNotFoundException('CustomFieldsGroup with id '
|
||||||
@ -109,7 +110,7 @@ class CustomFieldController extends Controller
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
|
$entity = $em->getRepository(CustomField::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find CustomField entity.');
|
throw $this->createNotFoundException('Unable to find CustomField entity.');
|
||||||
@ -127,7 +128,7 @@ class CustomFieldController extends Controller
|
|||||||
{
|
{
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
$entity = $em->getRepository('ChillCustomFieldsBundle:CustomField')->find($id);
|
$entity = $em->getRepository(CustomField::class)->find($id);
|
||||||
|
|
||||||
if (!$entity) {
|
if (!$entity) {
|
||||||
throw $this->createNotFoundException('Unable to find CustomField entity.');
|
throw $this->createNotFoundException('Unable to find CustomField entity.');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user