I am trying to edit a record which have to choices and have to select value there.
$formMapper->add('addedBy', EntityType::class, [
'class' => 'AppBundle:User', 'choice_label' => function ($user) {
return $user->getFullName();
},
])
->add('medicalProvider', EntityType::class, [
'class' => 'AppBundle:MedicalProvider', 'choice_label' => function ($medicalProvider) {
return $medicalProvider->getName();
},
])
In Review section i have two entities form which i have to take values User and MedicalProvider , but when i load that things in choice_label, I am getting error like this.
: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21348352 bytes) in : Uncaught Symfony\Component\Debug\Exception\OutOfMemoryException: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21348352 bytes) in D:\software\xampp\htdocs\meopin_2\trunk\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Profiler\FileProfilerStorage.php:158 Stack trace:
Next LogicException: Request stack is empty in D:\software\xampp\htdocs\meopin_2\trunk\var\cache\dev\classes.php:4690 Stack trace:
Anyone can you please help me ?
Thanks in advance.
I got the solution by extending memory limit.
But page tooks lot time to load anybody have any idea to minimize page loading time?