Contest

onCompetitionDisplay

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

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

Arguments $context - the context of the event, ‘com_competition.competition’. $item - the contest object.

onCompetitionBeforeDelete

onCompetitionAfterDelete

Description These plugins are triggered in CompetitionModelCompetition::delete (admin). If the plugin returns false for onCompetitionBeforeDelete event then the contest is not being deleted.

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

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

onCompetitionBeforeSave

onCompetitionAfterSave

Description These events are triggered in CompetitionModelCompetition::save (admin). If the plugin returns false for onCompetitionBeforeSave event then the contest is not being saved to the database.

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

Arguments $context - the context of the event, ‘com_competition.competition’. $table - a reference to CompetitionTableCompetition object. $isNew - true for new contest, false otherwise./

onCompetitionChangeState

Description Is triggered in CompetitionModelCompetition::publish (admin) after field has its state changed.

public function onCompetitionChangeState($context, $pks, $value)
{
    // Do something
    return;
}

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

Last updated