You are here

function pet_isset_or in Previewable email templates 8.4

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

Check if a variable is set and return it if so, otherwise the alternative.

5 calls to pet_isset_or()
PetPreviewForm::buildForm in src/Form/PetPreviewForm.php
Form constructor.
PetPreviewForm::pet_make_preview in src/Form/PetPreviewForm.php
Generate a preview of the tokenized email for the first in the list.
PetPreviewForm::submitForm in src/Form/PetPreviewForm.php
Form submission handler.
pet_send_mail in ./pet.module
Send tokenized email to a list of recipients.
pet_substitutions in ./pet.module
Load the token objects for a PET template in preparation for token substitution.

File

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

Code

function pet_isset_or(&$val, $alternate = NULL) {
  return isset($val) ? $val : $alternate;
}