function ds_api_info in Display Suite 6.3
Same name and namespace in other branches
- 6 ds.module \ds_api_info()
- 6.2 ds.module \ds_api_info()
Return API information about a module and type
Parameters
string $module : The module to get the API information from
string $type_name : The object type name
Deprecated
Use ds_get_plugins('ds_display') instead.
18 calls to ds_api_info()
- dsRegionToBlock::block_list in plugins/
ds_extension/ regiontoblock.inc - plugin block listing.
- ds_block_field_form in includes/
ds.fields.inc - Block field form.
- ds_build_modes_page in includes/
ds.buildmodes.inc - Build modes overview.
- ds_code_field_form in includes/
ds.fields.inc - Code field form.
- ds_display_overview_form in includes/
ds.display.inc - Menu callback; presents a listing of fields display settings for an object type.
File
- ./
ds.module, line 326
Code
function ds_api_info($module, $type_name = 'all') {
static $api_info = array();
if (!isset($api_info[$module][$type_name])) {
// Gather information.
$function = $module . '_ds_api';
if (function_exists($function)) {
$api_data = call_user_func($function);
}
else {
return FALSE;
}
$api_info[$module][$type_name] = $api_data;
if (!isset($api_info[$module][$type_name]['extra'])) {
$api_info[$module][$type_name]['extra'] = array();
}
// Extra info needed or not.
if ($type_name != 'all' && !empty($api_data['extra'])) {
$extra = array();
$types = $api_data['types']();
$type_info = $types[$type_name];
foreach ($api_data['extra'] as $key) {
$extra[$key] = $type_info->{$key};
}
$api_info[$module][$type_name]['extra'] = $extra;
}
}
return $api_info[$module][$type_name];
}