Beispiel #1
0
 /**
  * Remove a conclusion from this person.
  *
  * @param Conclusion            $conclusion
  * @param StateTransitionOption $option,...
  *
  * @return PersonState
  * @throws Exception\GedcomxApplicationException
  */
 protected function deleteConclusion(Conclusion $conclusion, StateTransitionOption $option = null)
 {
     $link = $conclusion->getLink(Rel::CONCLUSION);
     if ($link == null) {
         $conclusion->getLink(Rel::SELF);
     }
     if ($link == null || $link->getHref() == null) {
         throw new GedcomxApplicationException("Conclusion cannot be deleted: missing link.");
     }
     $request = $this->createAuthenticatedGedcomxRequest('DELETE', $link->getHref());
     return $this->stateFactory->createState('PersonState', $this->client, $request, $this->passOptionsTo('invoke', array($request), func_get_args()), $this->accessToken);
 }