function imageinfo_cache_bundle_admin_path in Imageinfo Cache 7.3
Determines the administration path for a bundle.
Parameters
string $entity_type: The type of entity; e.g. 'node' or 'user'.
string $bundle_name: The bundle name.
string $field_name: The field name.
Return value
mixed NULL if no admin path is found; the string of the admin path.
1 call to imageinfo_cache_bundle_admin_path()
- imageinfo_cache_admin_settings_form in ./
imageinfo_cache.admin.inc - Form builder; Configure advagg settings.
File
- ./
imageinfo_cache.admin.inc, line 21 - Admin page callbacks for the imageinfo cache module.
Code
function imageinfo_cache_bundle_admin_path($entity_type, $bundle_name, $field_name) {
$bundles = field_info_bundles($entity_type);
if (empty($bundles) || empty($bundles[$bundle_name])) {
return;
}
if (isset($bundles[$bundle_name]['admin'])) {
$return = isset($bundles[$bundle_name]['admin']['real path']) ? $bundles[$bundle_name]['admin']['real path'] : $bundles[$bundle_name]['admin']['path'];
$return .= '/fields/' . $field_name;
return $return;
}
}