|
|
|
@@ -37,7 +37,10 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
* CustomFieldsGroupController constructor.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
private readonly CustomFieldProvider $customFieldProvider, private readonly TranslatorInterface $translator, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
|
|
|
|
|
private readonly CustomFieldProvider $customFieldProvider,
|
|
|
|
|
private readonly TranslatorInterface $translator,
|
|
|
|
|
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
|
|
|
|
|
) {}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a new CustomFieldsGroup entity.
|
|
|
|
@@ -79,7 +82,7 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
{
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
|
|
|
|
|
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
|
|
|
|
|
|
|
|
|
|
if (!$entity) {
|
|
|
|
|
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
|
|
|
|
@@ -102,7 +105,7 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
{
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$cfGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findAll();
|
|
|
|
|
$cfGroups = $em->getRepository(CustomFieldsGroup::class)->findAll();
|
|
|
|
|
$defaultGroups = $this->getDefaultGroupsId();
|
|
|
|
|
|
|
|
|
|
$makeDefaultFormViews = [];
|
|
|
|
@@ -134,13 +137,13 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findOneById($cFGroupId);
|
|
|
|
|
$cFGroup = $em->getRepository(CustomFieldsGroup::class)->findOneById($cFGroupId);
|
|
|
|
|
|
|
|
|
|
if (!$cFGroup) {
|
|
|
|
|
throw $this->createNotFoundException('customFieldsGroup not found with '."id {$cFGroupId}");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$cFDefaultGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class)
|
|
|
|
|
$cFDefaultGroup = $em->getRepository(CustomFieldsDefaultGroup::class)
|
|
|
|
|
->findOneByEntity($cFGroup->getEntity());
|
|
|
|
|
|
|
|
|
|
if ($cFDefaultGroup) {
|
|
|
|
@@ -195,7 +198,7 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
{
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
|
|
|
|
|
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
|
|
|
|
|
|
|
|
|
|
if (!$entity) {
|
|
|
|
|
throw $this->createNotFoundException('Unable to find CustomFieldsGroups entity.');
|
|
|
|
@@ -239,7 +242,7 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
{
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
|
|
|
|
|
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
|
|
|
|
|
|
|
|
|
|
if (!$entity) {
|
|
|
|
|
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
|
|
|
|
@@ -263,7 +266,7 @@ class CustomFieldsGroupController extends AbstractController
|
|
|
|
|
{
|
|
|
|
|
$em = $this->managerRegistry->getManager();
|
|
|
|
|
|
|
|
|
|
$entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id);
|
|
|
|
|
$entity = $em->getRepository(CustomFieldsGroup::class)->find($id);
|
|
|
|
|
|
|
|
|
|
if (!$entity) {
|
|
|
|
|
throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.');
|
|
|
|
|