NorrCompetition | NorrNext Documentation
DocumentationNorrCompetition
  • ๐Ÿš€Getting started
    • Technical Requirements
    • Installation and Updates
  • ๐Ÿ› ๏ธConfiguration
    • Component Options
    • General
    • Contests
    • Contest
    • Entries
    • Entry
    • Categories
    • Category
    • Images
    • Comments
    • Contest Form
    • Permissions
  • ๐Ÿ–ผ๏ธContests
    • Managing Contests
    • Creating Contest
    • Contest Layout Options
    • Closing Contest
  • ๐Ÿ†Entries
    • Managing Entries
    • Adding Entry
    • Approving Entry
    • Entry Data Comparison
    • Entry Layout Options
    • Submitting Entry Form
    • Contestant's Profile
    • Votes Log
  • ๐Ÿ“‚Categories
    • General Information
    • Managing Categories
    • Creating Category
    • Category Layout Options
  • ๐ŸงฉFields
    • General Information
    • Managing Fields
    • Field Types
    • Creating Field
  • ๐Ÿ”‹Modules
    • NorrCompetition Entries
    • NorrCompetition Contests
    • NorrCompetition Grid
  • ๐Ÿ”ŒPlugins
    • NorrCompetition Notifications
    • NorrCompetition Smart Search
    • NorrCompetition Search
    • NorrCompetition Sitemap
    • NorrCompetition Profile Link
    • Application for EasySocial
    • NorrCompetition Application for JomSocial
    • AUP plugin for NorrCompetition
    • NorrCompetition Image Moderation
      • Sightengine Setup
      • Plugin Configuration
  • ๐Ÿ’ฌComments
    • Integration with Facebook
    • Integration with JComments
    • Integration with Komento
    • Integration with Disqus
    • Integration with VK.com
  • โ˜๏ธRemote Storage
    • General Information
    • AWS S3
  • ๐Ÿ–ฅ๏ธCustomisation
    • Template Overriding
    • Using content plugins on entry page
    • Link to contestant
    • Events
      • Content
      • Contest
      • Entry
      • Entry Form
      • Field
      • Vote
      • Other
  • โœ๏ธLocalisation
    • Language pack installation
    • How to take a part in NorrCompetition localisation
  • ๐Ÿ“œBest Practices
    • Recommendations on image sizes
    • Use on multilingual sites
    • Tutorial: How to Create Photo/Video Voting Contest on Joomla
    • Tutorial: Monetize Voting Contests via Membership
    • Tutorial: Monetize Voting Contests via Points
    • Embedding HTML snippets on example of music contest
  • ๐Ÿ’กFAQ
    • How the protection from unfair voting is implemented?
    • What notifications does the component send?
    • Create and edit contests on front-end
    • Submitting Entries by Unregistered Users
    • How to install sample data
    • How to change the order of tabs with comments
    • Using navigation module (breadcrumbs)
    • NorrCompetition and YOOtheme Pro
  • ๐Ÿ”Troubleshooting
    • I do not get notifications from NorrCompetition
    • I get an error or white screen on photo upload
    • No images appear after submitting entries
    • Submit button is not working
  • User is not able to vote. Errors in the console
Powered by GitBook
On this page
  • onFieldBeforeDelete
  • onFieldAfterDelete
  • onFieldBeforeSave
  • onFieldAfterSave
  • onFieldChangeState
  1. Customisation
  2. Events

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.

PreviousEntry FormNextVote

Last updated 2 years ago

๐Ÿ–ฅ๏ธ