function skinr_context_group_to_context in Skinr 7.2
Same name and namespace in other branches
- 8.2 skinr_context/skinr_context.module \skinr_context_group_to_context()
Helper function to create a context object from a skin settings group.
Parameters
$group: Skinr settings group object.
Return value
A context object.
2 calls to skinr_context_group_to_context()
- skinr_context_context_default_contexts in skinr_context/
skinr_context.module - Implements hook_context_default_contexts().
- skinr_context_ui_form_skinr_ui_form_alter in skinr_context/
skinr_context_ui.module - Implements hook_form_alter().
File
- skinr_context/
skinr_context.module, line 562 - Provides Skinr integration with Context.
Code
function skinr_context_group_to_context($group) {
$context = (object) array(
'name' => 'skinr_group__' . $group->gid,
'description' => !empty($group->description) ? t('@title: @description', array(
'@title' => $group->title,
'@description' => $group->description,
)) : check_plain($group->title),
'tag' => 'Skinr',
'conditions' => $group->conditions,
'reactions' => array(),
'condition_mode' => $group->condition_mode,
);
return $context;
}