You are here

function acquia_lift_target_definition_changes_allowed in Acquia Lift Connector 7.2

Check to see if an acquia lift target agent allows changes that would affect the definition of the agent or any nested agents.

Parameters

stdClass $agent_data: The agent to check.

Return value

bool True if changes can be made, false otherwise.

14 calls to acquia_lift_target_definition_changes_allowed()
acquia_lift_form_personalize_blocks_form_alter in ./acquia_lift.module
Implements hook_form_FORM_ID_alter().
acquia_lift_form_personalize_elements_form_alter in ./acquia_lift.module
Implements hook_form_FORM_ID_alter().
acquia_lift_get_campaign_details in ./acquia_lift.module
Generate an array of campaign settings that are currently configured. This administrative information is used for navigation and campaign management.
acquia_lift_get_option_set_editable_settings in ./acquia_lift.module
Helper function to generate editable JavaScript settings for an option set.
acquia_lift_personalize_campaign_action_links_alter in ./acquia_lift.module
Implements hook_personalize_campaign_action_links_alter().

... See full list

File

./acquia_lift.admin.inc, line 2143
acquia_lift.admin.inc Provides functions needed for the admin UI.

Code

function acquia_lift_target_definition_changes_allowed($agent_data) {
  if ($agent_data->plugin !== 'acquia_lift_target') {
    return TRUE;
  }
  $status = personalize_agent_get_status($agent_data->machine_name);
  return $status == PERSONALIZE_STATUS_NOT_STARTED || $status == PERSONALIZE_STATUS_PAUSED;
}