/**
  * Constructor.
  *
  * @param EventDispatcherInterface   $dispatcher
  * @param RequestStack               $requestStack
  * @param RouterInterface            $router
  * @param string                     $type
  * @param int                        $defaultPageSize
  * @param ChoiceListFactoryInterface $choiceListFactory
  */
 public function __construct(EventDispatcherInterface $dispatcher, RequestStack $requestStack, RouterInterface $router, $type, $defaultPageSize = 10, ChoiceListFactoryInterface $choiceListFactory = null)
 {
     $this->dispatcher = $dispatcher;
     $this->requestStack = $requestStack;
     $this->router = $router;
     $this->type = $type;
     parent::__construct($defaultPageSize, $choiceListFactory);
 }