public function build(FormFactoryInterface $form_factory, $data = null)
    {
        $options = is_callable($this->options) ? call_user_func($this->options, $data) : $this->options;

        if (null !== $this->name) {
            $form = $form_factory->createNamed($this->name, $this->type, $data, $options);
        } else {
            $form = $form_factory->create($this->type, $data, $options);
        }

        return new FormSubmitProcessor($form, $this->on_success, $this->on_failure, $this->form_submit_processor);
    }