Field

onFieldBeforeDelete

onFieldAfterDelete

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

public function onFieldBeforeDelete($context, $table)
{
    // Do something and abort delete
    return false;
}

Arguments $context - the context of the event, โ€˜com_competition.fieldโ€™. $table - a reference to CompetitionTableField object.

onFieldBeforeSave

onFieldAfterSave

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

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

Arguments $context - the context of the event, โ€˜com_competition.fieldโ€™. $table - a reference to CompetitionTableField object. $isNew - true for new field, false otherwise.

onFieldChangeState

Description This evenr is triggered in CompetitionModeField::publish (admin) after field has its state changed.

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

Arguments $context - the context of the event, โ€˜com_competition.fieldโ€™. $pks - a list of the primary keys to change. $value - the value of the state.

Last updated