Last active
December 17, 2015 01:59
-
-
Save atishgoswami/5532847 to your computer and use it in GitHub Desktop.
Disable callbacks on save mainly focusing on not calling aftersave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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