function og_ctools_context_converter_alter in Organic groups 7
Implements hook_ctools_context_converter_alter().
Converter function for CTools context entity:group.
File
- ./
og.module, line 889 - Enable users to create and manage groups with roles and permissions.
Code
function og_ctools_context_converter_alter($context, $converter, &$value) {
if (!empty($context->type[0]) && $context->type[0] == 'entity:group' && !empty($context->data)) {
switch ($converter) {
case 'gid':
$value = $context->data->gid;
break;
case 'entity_type':
$value = $context->data->entity_type;
break;
case 'entity_id':
$value = $context->data->etid;
break;
case 'label':
$value = $context->data->label;
}
}
}