You are here

function pet_is_valid in Previewable email templates 8.4

Same name and namespace in other branches
  1. 8 pet.module \pet_is_valid()
  2. 6 pet.module \pet_is_valid()
  3. 7 pet.module \pet_is_valid()

Check the validity of a loaded PET.

Don't want this to be too expensive, but don't want to send bogus emails either.

1 call to pet_is_valid()
pet_send_one_mail in ./pet.module
Send one email, with token substitution.

File

./pet.module, line 310
Previewable Email Template module.

Code

function pet_is_valid($pet) {
  return is_object($pet) && is_numeric($pet
    ->id());
}