You are here

function acquia_lift_is_testing_agent in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 acquia_lift.module \acquia_lift_is_testing_agent()

Returns whether or not the passed in agent is a testing agent.

Parameters

$agent: An object representing the agent.

Return value

bool TRUE if the object is an agent whose plugin is one of the testing plugins provided by this module, FALSE otherwise.

10 calls to acquia_lift_is_testing_agent()
acquia_lift_form_personalize_agent_form_alter in ./acquia_lift.module
Implements hook_form_FORM_ID_alter().
acquia_lift_get_sync_operations_for_agents in ./acquia_lift.batch.inc
Gets the required operations for syncing the specified agents to Lift.
acquia_lift_personalize_agent_date_form_alter in ./acquia_lift.module
Implements hook_personalize_agent_date_form_alter().
acquia_lift_personalize_agent_delete in ./acquia_lift.module
Implements hook_personalize_agent_delete().
acquia_lift_personalize_agent_update_status in ./acquia_lift.module
Implements hook_personalize_agent_update_status().

... See full list

File

./acquia_lift.module, line 518
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_is_testing_agent($agent) {
  if (empty($agent)) {
    return FALSE;
  }
  $agent_types = array(
    'acquia_lift',
    'acquia_lift_simple_ab',
  );
  return in_array($agent->plugin, $agent_types);
}