remove() 공개 메소드

Removes an account
public remove ( object $object ) : void
$object object The account to remove
리턴 void
 /**
  * Deletes the specified user and all remaining content in his personal workspaces
  *
  * @param User $user The user to delete
  * @return void
  * @throws Exception
  * @api
  */
 public function deleteUser(User $user)
 {
     $backendUserRole = $this->policyService->getRole('Neos.Neos:AbstractEditor');
     foreach ($user->getAccounts() as $account) {
         /** @var Account $account */
         if ($account->hasRole($backendUserRole)) {
             $this->deletePersonalWorkspace($account->getAccountIdentifier());
         }
         $this->accountRepository->remove($account);
     }
     $this->removeOwnerFromUsersWorkspaces($user);
     $this->partyRepository->remove($user);
     $this->emitUserDeleted($user);
 }