function acquia_lift_profiles_get_segments in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 acquia_lift_profiles/acquia_lift_profiles.module \acquia_lift_profiles_get_segments()
Returns the list of availble segments.
Return value
array An array of segment IDs.
1 call to acquia_lift_profiles_get_segments()
- acquia_lift_profiles_page_build in acquia_lift_profiles/
acquia_lift_profiles.module - Implements hook_page_build().
File
- acquia_lift_profiles/
acquia_lift_profiles.module, line 175 - acquia_lift_profiles.module Provides Acquia Lift Profiles integration.
Code
function acquia_lift_profiles_get_segments() {
$segments =& drupal_static(__FUNCTION__, NULL);
if ($segments === NULL) {
$cached = variable_get('acquia_lift_profiles_segments', NULL);
if ($cached === NULL) {
// The segments have never been retrieved from Acquia Lift Profiles.
acquia_lift_profiles_refresh_segments_cache();
$cached = variable_get('acquia_lift_profiles_segments', array());
}
$segments = $cached;
}
return $segments;
}