You are here

function party_data_set_load in Party 7

Same name and namespace in other branches
  1. 8.2 party.module \party_data_set_load()

Menu loader for data sets. First check against pieces, and if nothings found check against the $data_set_names themselves.

Parameters

$data_set_url_string: The url-form of a data set name, ie with hyphens instead of underscores.

Return value

A loaded data set definition.

1 call to party_data_set_load()
party_profile_party_view_profile_set in modules/party_profile/party_profile.pages.inc
Page callback for our data set-based party pieces.

File

./party.module, line 419
Provides a generic CRM party entity.

Code

function party_data_set_load($data_set_url_string) {
  foreach (party_get_data_set_info() as $data_set => $info) {

    // Match the path string we've been given with the one that's defined in
    // data sets and return the data set we find.
    if (isset($info['path element']) && $info['path element'] == $data_set_url_string) {
      return $info;
    }
  }

  // If nothings been found yet, check up the data set names
  return party_get_data_set_info($data_set_url_string);
}