Created
May 25, 2015 18:48
-
-
Save bueckl/8aff7360a3077fffc54b to your computer and use it in GitHub Desktop.
Silverstripe SS3 isEmptyObject
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
function isEmptyObject($o) { | |
if ( $o->toMap()['ID'] > 0) { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment