Skip to content

public Election::removeCandidates ​

Read it at the source

Description ​

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

Remove candidates from an election.

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

Parameter ​

candidates_input: CondorcetPHP\Condorcet\Candidate|array|string ​

String corresponding to the candidate's name or CondorcetPHP\Condorcet\Candidate object. Array filled with CondorcetPHP\Condorcet\Candidate objects. Array filled with strings corresponding to the candidate's name.

Return value ​

(array) List of removed candidate objects.

Throws: ​

  • CandidateDoesNotExistException
  • VotingHasStartedException


Tutorial ​

Released under the MIT License.