/** * Deletes the records that is referenced by the auth code from * the database * * @param array|\Tx\Authcode\Domain\Model\AuthCode $authCodeData * @param bool $markAsDeleted * @deprecated Since 0.7.0, will be removed in version 1.0.0, use AuthCodeRecordRepository instead. * @see \Tx\Authcode\Domain\Repository\AuthCodeRecordRepository::removeAssociatedRecord() */ public function removeAuthCodeRecordFromDB($authCodeData, $markAsDeleted = FALSE) { if (is_array($authCodeData)) { $authCode = $this->authCodeRepository->findByUid($authCodeData['uid']); } elseif ($authCodeData instanceof \Tx\Authcode\Domain\Model\AuthCode) { $authCode = $authCodeData; } else { throw new \InvalidArgumentException('$authCodeData must either be an array or an instance of \\Tx\\Authcode\\Domain\\Model\\AuthCode'); } $this->authCodeRecordRepository->removeAssociatedRecord($authCode, !$markAsDeleted); }