How to change generate getxxx and isxxx method for boolean field
Hi,
How i can change settings to generate both is and get method when my field is boolean?
Example:
I create a field $myBoolField As boolean
So i want to generate at the same time getMyBoolField() and isMyBoolField() methods
Thanks for your help
Please sign in to leave a comment.
Easy.
1. "Settings/Preferences | Editor | File and Code Templates | Code | PHP Getter Method"
2. You need to edit the template: a) change automatic "get/is" prefix to hardcoded "get" and b) add the template for "is" below it surrounded by condition (so that it will only be used for boolean fields).
Something like this (adjust empty lines/etc as needed)