function ds_default_value in Display Suite 6.3
Same name and namespace in other branches
- 6 ds.module \ds_default_value()
- 6.2 ds.module \ds_default_value()
Return a value or return the default if empty.
Parameters
array $settings The settings loaded for a type.:
string $type The name of the type to search (ie fields, regions):
string $key The name of the key to search in $type.:
string $search_key The name of the key to search in $key.:
string $default The default value.:
mixed default value.:
10 calls to ds_default_value()
- dsDisplay::render in includes/
dsDisplay.php - Render content
- dsEmptyRegionRender::execute in plugins/
ds_extension/ emptyregionrender.inc - execute().
- dsEmptyRegionRender::plugin_form in plugins/
ds_extension/ emptyregionrender.inc - plugin_form().
- dsRegionToBlock::execute in plugins/
ds_extension/ regiontoblock.inc - execute().
- dsRegionToBlock::plugin_form in plugins/
ds_extension/ regiontoblock.inc - plugin_form().
File
- ./
ds.module, line 493
Code
function ds_default_value($settings, $type, $key = NULL, $search_key = NULL, $default = NULL) {
if ($key == NULL) {
return isset($settings[$type]) ? $settings[$type] : NULL;
}
return isset($settings[$type][$key][$search_key]) ? $settings[$type][$key][$search_key] : $default;
}