You are here

function uuid_uri_array_to_data in Universally Unique IDentifier 7

Converts a URI array to entity data array.

Parameters

array $uri: The URI parts, often taken from arg().

Return value

array The entity data.

2 calls to uuid_uri_array_to_data()
uuid_redirector in ./uuid.module
Redirects all UUID URI requests to the appropriate entity page.
uuid_uri_to_data in ./uuid.inc
Converts a UUID URI string to an entity data array.

File

./uuid.inc, line 189
Handling of universally unique identifiers.

Code

function uuid_uri_array_to_data($uri, $strip_uuid = TRUE) {
  if ($strip_uuid) {
    array_shift($uri);
  }
  $data = array(
    'request' => $uri,
    'entity_type' => isset($uri[0]) ? $uri[0] : NULL,
    'uuid' => isset($uri[1]) ? $uri[1] : NULL,
  );
  drupal_alter('uuid_uri_data', $data);
  return $data;
}