Skip to content

Instantly share code, notes, and snippets.

@atishgoswami
Last active December 17, 2015 01:59
Show Gist options
  • Save atishgoswami/5532847 to your computer and use it in GitHub Desktop.
Save atishgoswami/5532847 to your computer and use it in GitHub Desktop.
Disable callbacks on save mainly focusing on not calling aftersave
saveField(string $fieldName, string $fieldValue, array $params = array())
$params array can have any of the following available options as keys:
validate Set to true/false to enable disable validation.
callbacks Set to false to disable callbacks. Using ‘before’ or ‘after’ will enable only those callbacks.
$leaveSettings['WeekDiff'] =
(int)floor(date_diff(new DateTime($leaveSettings['sessionStartDate']), new DateTime($presentDay))->days/7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment