In ZF3, I am calling a form factory from a controller using this notation:
$form = $this->formManager->get(myForm::class);
not
$form = new myForm();
In the factory, I'm using what ZF3 recommends for the method:
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
//...
}
I assume that the $options
array is intended for passing parameters to the function. How do I populate the $options
array in the controller?