/** * @param ConfirmationInterface $confirmation * @param array $options */ public function add(ConfirmationInterface $confirmation, array $options = array()) { $this->types[$confirmation->getType()] = $confirmation; if (!empty($options)) { $this->options[$confirmation->getType()] = $options; } }
public function addSubject(FormEvent $event) { $data = $event->getData(); $subject = null; if ($data instanceof ResendInterface) { $subject = $this->confirmation->findSubject($data->getSubjectValue()); } if ($data instanceof VerificationInterface) { $subject = $this->confirmation->findSubjectWithToken($data->getToken()); } $data->setSubject($subject); }