Entry

onParticipantDisplay

Description This event is triggered in CompetitionViewParticipant::display (site).

public function onParticipantDisplay($context, $item)
{
    // Do something
}

Arguments $context - the context of the event, ‘com_competition.participant’. $item - the entry object.

onParticipantBeforeDelete

onParticipantAfterDelete

Description These events are triggered in CompetitionModelParticipant::delete (admin). If the plugin returns false for onParticipantBeforeDelete event then the entry is not being deleted.

public function onParticipantBeforeDelete($context, $table)
{
    // Do something
    return true;
}

Arguments $context - the context of the event, ‘com_competition.participant’. $table - a reference to CompetitionTableParticipant object.

onParticipantBeforeSave

onParticipantAfterSave

Description These plugins are triggered in CompetitionModelAppform::saveParticipant (site) and CompetitionModelParticipant::save (admin). If the plugin returns false for onParticipantBeforeSave event then the entry is not being saved to the database and transaction is rolled back.

Please note that onParticipantAfterSave event is triggered inside the transaction that can be rolled back. To make sure that all the data is saved use the *AfterSaveTransactionCommit event.

Arguments $context - the context of the event: ‘com_competition.participant’ or ‘com_competition.appform’. $table - a reference to CompetitionTableParticipant object. $isNew - true for new entry, false otherwise.

onParticipantBeforeSaveTransactionCommit

onParticipantAfterSaveTransactionCommit

Description These plugins are triggered in CompetitionModeParticipant::save (admin). If the plugin returns false for onParticipantBeforeSaveTransactionCommit event then the entry is not being saved to the database and transaction is rolled back.

Arguments $context - the context of the event, ‘com_competition.participant’. $data - the validated entry form data. $isNew - true for new entry, false otherwise.

onParticipantAllowedCompetitionVotes

Description This event is triggered in CompetitionModelParticipant::getVoteData (site) and allows to modify the maximum allowed votes for contest. For example to provide additional votes for a user.

Arguments $context - the context of the event, ‘com_competition.participant’. $participantId - the entry ID. $competition - a contest object. &$allowedVotes - allowed contest votes.

onParticipantAllowedParticipantVotes

Description This event is triggered in CompetitionModelParticipant::getVoteData (site) and allows to modify the maximum allowed votes per entry. For example to provide additional votes for a user.

Arguments $context - the context of the event, ‘com_competition.participant’. $participantId - the entry ID. $competition - a reference to contest object. &$allowedVotes - allowed entry votes.

onParticipantCheckVoteFrequency

Description This event is triggered in CompetitionModelParticipant::getVoteData (site). If the plugin returns false then vote frequency check is being skipped. This allows to provide an immediate vote for a user.

Arguments $context - the context of the event, ‘com_competition.participant’. $participantId - the entry ID. $competition - a reference to contest object.

onParticipantBeforeVoteSave

onParticipantAfterVoteSave

Description These events are triggered in CompetitionModelParticipant::vote (site). If the plugin returns false for onParticipantBeforeVoteSave event then the vote is not being saved to the database and error is being retruned to a user.

Arguments $context - the context of the event, ‘com_competition.participant’. $table - a reference to CompetitionTableVote object. $competitionParams - the parameters of competition in which a vote was taken.

onParticipantBeforeChangeState

Description This event is triggered in CompetitionModelParticipant::publish (admin) before participant has its state changed.

Arguments $context - the context of the event, ‘com_competition.participant’. $pk - the ID of entry. $value - the value of the state: -2 - deleted; 0 - unpublished; 1 - published.

onParticipantChangeState

Description This event is triggered in CompetitionModelParticipant::publish (admin) after entry has its state changed.

Arguments $context - the context of the event, ‘com_competition.participant’. $pks - a list of the primary keys to change. $value - the value of the state: -2 - deleted; 0 - unpublished; 1 - published.

onParticipantBeforeApprove

Description This event is triggered in CompetitionModelParticipant::approve (admin) before entry has its approval state changed.

Arguments $context - the context of the event, ‘com_competition.participant’. $table - the entry table object. $value - the value of the state: 0 - unapproved; 1 - approved.

onParticipantApprove

Description This event is triggered in CompetitionModelParticipant::approve (admin) after the entry has its approval state changed.

Arguments $context - the context of the event, ‘com_competition.participant’. $item - a list of the primary keys to change. $params - the value of the state: 0 - unapproved; 1 - approved.

Last updated