Prevent insert, update or erase, if trigger returns false

If the beforeinsert, beforeupdate or beforeerase trigger function returns false, the method returns false, and stops the desired action from happening.