I have the following code in PHP:
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('DataBundle:SomeData')->findAll();
foreach ($entity as $item)
{
echo $item->getSomething();
$data = $em->getRepository('DataBundle:SomeData')
->findBySomeId($item->getSomeId());
foreach ($data as $somevar)
{
echo $somevar->getSomeOtherData();
}
}
Can it be translated in Twig? If so, I would appreciate pointers on how it can be done.
Thanks