Skip to content

Latest commit

 

History

History
45 lines (25 loc) · 1.41 KB

public Election--removeCandidates.md

File metadata and controls

45 lines (25 loc) · 1.41 KB

public Election::removeCandidates

Read it at the source

Description

public Election->removeCandidates ( CondorcetPHP\Condorcet\Candidate|array|string $candidates_input ): array

Remove candidates from an election.

Please note: You can't remove candidates after the first vote. An exception will be thrown.

candidates_input: CondorcetPHP\Condorcet\Candidate|array|string

  • String matching candidate name
  • CondorcetPHP\Condorcet\Candidate object
  • Array populated by CondorcetPHP\Condorcet\Candidate
  • Array populated by string matching candidate name.

Return value:

(array) List of removed CondorcetPHP\Condorcet\Candidate object.

Throws:

  • CondorcetPHP\Condorcet\Throwable\CandidateDoesNotExistException
  • CondorcetPHP\Condorcet\Throwable\VotingHasStartedException

Related method(s)


Tutorial