mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix loading data for customfield with new templating engine
This commit is contained in:
parent
169bf3c140
commit
2ad82e8cc1
@ -21,11 +21,13 @@ use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Twig\Environment;
|
||||
|
||||
class LoadCustomFields extends AbstractFixture implements
|
||||
ContainerAwareInterface,
|
||||
@ -78,7 +80,7 @@ class LoadCustomFields extends AbstractFixture implements
|
||||
private function createCustomFieldChoice()
|
||||
{
|
||||
return new CustomFieldChoice(
|
||||
$this->container->get('templating'),
|
||||
$this->container->get(Environment::class),
|
||||
$this->translatableStringHelper
|
||||
);
|
||||
}
|
||||
@ -86,14 +88,14 @@ class LoadCustomFields extends AbstractFixture implements
|
||||
private function createCustomFieldText()
|
||||
{
|
||||
return new CustomFieldText(
|
||||
$this->container->get('templating'),
|
||||
$this->container->get(Environment::class),
|
||||
$this->translatableStringHelper
|
||||
);
|
||||
}
|
||||
|
||||
private function loadData(ObjectManager $manager)
|
||||
{
|
||||
$personIds = $this->container->get('doctrine.orm.entity_manager')
|
||||
$personIds = $this->container->get(EntityManagerInterface::class)
|
||||
->createQuery('SELECT person.id FROM ChillPersonBundle:Person person')
|
||||
->getScalarResult();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user