You are here

function _cer_profile2_is_profile2_preset in Corresponding Entity References 7.3

Returns if either side of a preset refers to a profile2.

Parameters

\CerPreset $preset: The preset to test.

Return value

bool

2 calls to _cer_profile2_is_profile2_preset()
cer_profile2_disable in extensions/cer_profile2/cer_profile2.install
Implements hook_disable().
cer_profile2_uninstall in extensions/cer_profile2/cer_profile2.install
Implements hook_uninstall().

File

extensions/cer_profile2/cer_profile2.module, line 13

Code

function _cer_profile2_is_profile2_preset(CerPreset $preset) {
  return preg_match(CER_PROFILE2_PATTERN, $preset->wrapper->cer_left
    ->value()) || preg_match(CER_PROFILE2_PATTERN, $preset->wrapper->cer_right
    ->value());
}