function path_breadcrumbs_load in Path Breadcrumbs 7.3
Same name and namespace in other branches
- 7 path_breadcrumbs.module \path_breadcrumbs_load()
- 7.2 path_breadcrumbs.module \path_breadcrumbs_load()
Load path breadcrumbs by ID.
Parameters
int $path_id: ID of path breadcrumb that should be loaded.
Return value
object Loaded path breadcrumb.
File
- ./
path_breadcrumbs.module, line 593
Code
function path_breadcrumbs_load($path_id) {
// Cache it because Ctools cache is not helpful for 'conditions' loading.
$paths =& drupal_static(__FUNCTION__);
if (!isset($paths[$path_id])) {
ctools_include('export');
$result = ctools_export_load_object('path_breadcrumbs', 'conditions', array(
'path_id' => $path_id,
));
$path_breadcrumbs = reset($result);
if (!empty($path_breadcrumbs)) {
// Merge breadcrumb data with parent for more flattening structure.
$path_breadcrumbs = path_breadcrumbs_load_prepare($path_breadcrumbs);
$paths[$path_id] = $path_breadcrumbs;
}
}
return isset($paths[$path_id]) ? $paths[$path_id] : FALSE;
}