You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, how do you get entity manager injected into filter class?
When i call validateIncomingData i got exception "Argument 1 passed to UserInputFilter::__construct() must implement interface Doctrine\ORM\EntityManagerInterface, none given"
NodefectFilter.php
<?php
namespace Project\Form;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilter;
use Doctrine\ORM\EntityManagerInterface;
class NodefectFilter extends InputFilter
{
private $entityManager;
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
$this->add(array(
....
));
}
}
Hi, how do you get entity manager injected into filter class?
When i call validateIncomingData i got exception "Argument 1 passed to UserInputFilter::__construct() must implement interface Doctrine\ORM\EntityManagerInterface, none given"
NodefectFilter.php
in controller
The text was updated successfully, but these errors were encountered: