Skip to content

Commit

Permalink
Misc. updates to changes from pull request #566
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Kumar committed Jul 25, 2022
1 parent ae2ecb6 commit 5d3c4df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions PreparedResponse/Actions/Ticket/UpdateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ public static function getOptions(ContainerInterface $container)
{
$entityManager = $container->get('doctrine.orm.entity_manager');

$collection = $entityManager->getRepository('UVDeskCoreFrameworkBundle:TicketType')->findBy(['isActive' => true], ['code' => 'ASC']);

return array_map(function ($ticketType) {
return [
'id' => $ticketType->getId(),
'name' => $ticketType->getCode(),
];
}, $entityManager->getRepository('UVDeskCoreFrameworkBundle:TicketType')
->findBy(['isActive' => true], ['code' => 'ASC']));
}, $collection);
}

public static function applyAction(ContainerInterface $container, $entity, $value = null)
Expand Down
5 changes: 3 additions & 2 deletions Workflow/Actions/Ticket/UpdateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ public static function getOptions(ContainerInterface $container)
{
$entityManager = $container->get('doctrine.orm.entity_manager');

$collection = $entityManager->getRepository('UVDeskCoreFrameworkBundle:TicketType')->findBy(['isActive' => true], ['code' => 'ASC']);

return array_map(function ($ticketType) {
return [
'id' => $ticketType->getId(),
'name' => $ticketType->getCode(),
];
}, $entityManager->getRepository('UVDeskCoreFrameworkBundle:TicketType')
->findBy(['isActive' => true], ['code' => 'ASC']));
}, $collection);
}

public static function applyAction(ContainerInterface $container, $entity, $value = null)
Expand Down

0 comments on commit 5d3c4df

Please sign in to comment.