From 8fd3d187ff2bb0806b6f1982d6ddb4589b51b9e4 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Sun, 7 Apr 2024 02:07:38 -0500 Subject: [PATCH] Internal: Add missing repositoryClass config in entities --- src/CoreBundle/Entity/TicketMessageAttachment.php | 3 ++- src/CourseBundle/Entity/CLpCategory.php | 4 ++-- src/CourseBundle/Entity/CLpItem.php | 3 ++- src/CourseBundle/Entity/CToolIntro.php | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/CoreBundle/Entity/TicketMessageAttachment.php b/src/CoreBundle/Entity/TicketMessageAttachment.php index 7a8eed208f..33a249d02e 100644 --- a/src/CoreBundle/Entity/TicketMessageAttachment.php +++ b/src/CoreBundle/Entity/TicketMessageAttachment.php @@ -6,12 +6,13 @@ declare(strict_types=1); namespace Chamilo\CoreBundle\Entity; +use Chamilo\CoreBundle\Repository\Node\TicketMessageAttachmentRepository; use DateTime; use Doctrine\ORM\Mapping as ORM; use Stringable; #[ORM\Table(name: 'ticket_message_attachments')] -#[ORM\Entity] +#[ORM\Entity(repositoryClass: TicketMessageAttachmentRepository::class)] class TicketMessageAttachment extends AbstractResource implements ResourceInterface, Stringable { #[ORM\Column(name: 'id', type: 'integer')] diff --git a/src/CourseBundle/Entity/CLpCategory.php b/src/CourseBundle/Entity/CLpCategory.php index ab214d9939..095ed70655 100644 --- a/src/CourseBundle/Entity/CLpCategory.php +++ b/src/CourseBundle/Entity/CLpCategory.php @@ -10,11 +10,11 @@ use Chamilo\CoreBundle\Entity\AbstractResource; use Chamilo\CoreBundle\Entity\ResourceInterface; use Chamilo\CoreBundle\Entity\ResourceShowCourseResourcesInSessionInterface; use Chamilo\CoreBundle\Entity\User; +use Chamilo\CourseBundle\Repository\CLpCategoryRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\Mapping as ORM; -use Gedmo\Sortable\Entity\Repository\SortableRepository; use Stringable; use Symfony\Component\Validator\Constraints as Assert; @@ -22,7 +22,7 @@ use Symfony\Component\Validator\Constraints as Assert; * Learning paths categories. */ #[ORM\Table(name: 'c_lp_category')] -#[ORM\Entity(repositoryClass: SortableRepository::class)] +#[ORM\Entity(repositoryClass: CLpCategoryRepository::class)] class CLpCategory extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable { #[ORM\Column(name: 'iid', type: 'integer')] diff --git a/src/CourseBundle/Entity/CLpItem.php b/src/CourseBundle/Entity/CLpItem.php index 178abcc5f1..a90a072bdc 100644 --- a/src/CourseBundle/Entity/CLpItem.php +++ b/src/CourseBundle/Entity/CLpItem.php @@ -6,6 +6,7 @@ declare(strict_types=1); namespace Chamilo\CourseBundle\Entity; +use Chamilo\CourseBundle\Repository\CLpItemRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; @@ -19,7 +20,7 @@ use Symfony\Component\Validator\Constraints as Assert; #[ORM\Table(name: 'c_lp_item')] #[ORM\Index(name: 'lp_id', columns: ['lp_id'])] #[Gedmo\Tree(type: 'nested')] -#[ORM\Entity] +#[ORM\Entity(repositoryClass: CLpItemRepository::class)] class CLpItem implements Stringable { #[ORM\Column(name: 'iid', type: 'integer')] diff --git a/src/CourseBundle/Entity/CToolIntro.php b/src/CourseBundle/Entity/CToolIntro.php index 7df66b07b9..69c66adf46 100644 --- a/src/CourseBundle/Entity/CToolIntro.php +++ b/src/CourseBundle/Entity/CToolIntro.php @@ -17,6 +17,7 @@ use ApiPlatform\Metadata\Put; use Chamilo\CoreBundle\Entity\AbstractResource; use Chamilo\CoreBundle\Entity\ResourceInterface; use Chamilo\CoreBundle\Entity\ResourceShowCourseResourcesInSessionInterface; +use Chamilo\CourseBundle\Repository\CToolIntroRepository; use Doctrine\ORM\Mapping as ORM; use Stringable; use Symfony\Component\Serializer\Annotation\Groups; @@ -25,7 +26,7 @@ use Symfony\Component\Validator\Constraints as Assert; #[ApiResource(operations: [new Get(security: 'is_granted(\'VIEW\', object)'), new Put(security: 'is_granted(\'EDIT\', object)'), new Delete(security: 'is_granted(\'DELETE\', object)'), new GetCollection(security: 'is_granted(\'ROLE_USER\')'), new Post(securityPostDenormalize: 'is_granted(\'CREATE\', object)')], security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CURRENT_COURSE_TEACHER\')', denormalizationContext: ['groups' => ['c_tool_intro:write']], normalizationContext: ['groups' => ['c_tool_intro:read']])] #[ORM\Table(name: 'c_tool_intro')] -#[ORM\Entity] +#[ORM\Entity(repositoryClass: CToolIntroRepository::class)] #[ApiFilter(filterClass: SearchFilter::class, properties: ['courseTool' => 'exact'])] class CToolIntro extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable {