You are here

function _datalayer_get_selected_properties in dataLayer 7

Same name and namespace in other branches
  1. 8 datalayer.module \_datalayer_get_selected_properties()

Determine which properties will be output based on configuration.

Parameters

array $properties: Available properties for the entity.

array $selected: Selected properties for the entity.

2 calls to _datalayer_get_selected_properties()
datalayer_get_user_data in ./datalayer.module
Return all user data based on configured URL patterns.
_datalayer_get_entity_data in ./datalayer.module
Collect entity data for output and altering.

File

./datalayer.module, line 493
Client-side data space.

Code

function _datalayer_get_selected_properties(array $properties, array $selected) {
  $selected_properties = array_filter($selected);

  // Honor selective output configuration.
  $selected_properties = empty($selected_properties) ? $properties : $selected_properties;
  return $selected_properties;
}