function features_dom_decode_options in Features 7.2
Same name and namespace in other branches
- 6 features.admin.inc \features_dom_decode_options()
- 7 features.admin.inc \features_dom_decode_options()
Decodes an options array that was encoded by features_dom_encode_options().
Parameters
string[] $options: Format: $[$key] = $value Encoded options.
bool $keys_only: If TRUE, only the array keys will be decoded. If FALSE, both array keys and values will be decoded.
Return value
string[] Format, if $keys_only: $[$key_decoded] = $value Format, if !$keys_only: $[$key_decoded] = $value_decoded
See also
\features_dom_encode_options()
1 call to features_dom_decode_options()
- _features_export_build in ./
features.admin.inc - Return the full feature export array based upon user selections in form_state.
File
- ./
features.admin.inc, line 1808 - Forms for Features admin screens.
Code
function features_dom_decode_options($options, $keys_only = FALSE) {
$replacements = array_flip(features_dom_encode_map());
$encoded = array();
foreach ($options as $key => $value) {
$encoded[strtr($key, $replacements)] = $keys_only ? $value : strtr($value, $replacements);
}
return $encoded;
}