path_breadcrumbs_site.inc in Path Breadcrumbs 7.3
File
plugins/contexts/path_breadcrumbs_site.inc
View source
<?php
$plugin = array(
'title' => t('Site'),
'description' => t('A site object.'),
'context' => 'path_breadcrumbs_ctools_context_create_context',
'keyword' => 'site',
'context name' => 'site',
'convert' => 'path_breadcrumbs_ctools_context_site_convert',
'no ui' => TRUE,
'no required context ui' => TRUE,
);
function path_breadcrumbs_ctools_context_create_context($empty, $data = NULL, $conf = FALSE) {
$context = new ctools_context('path_breadcrumbs_site');
$context->plugin = 'path_breadcrumbs_site';
$context->keyword = 'site';
return $context;
}
function path_breadcrumbs_ctools_context_site_convert($context, $type) {
$values = token_generate('site', array(
$type => $type,
));
if (isset($values[$type])) {
return $values[$type];
}
return '';
}