コード例 #1
0
 /**
  * @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;
     }
 }
コード例 #2
0
 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);
 }