function ds_create_entity_context in Display Suite 7
Same name and namespace in other branches
- 7.2 ds.module \ds_create_entity_context()
Create entity context.
3 calls to ds_create_entity_context()
- ds_extras_entity_view_alter in modules/
ds_extras/ ds_extras.module - Implements hook_entity_view_alter().
- ds_extras_render_panel_layout in modules/
ds_extras/ ds_extras.module - Render the entity through the Panels layout.
- ds_render_ctools_field in ./
ds.module - Render a CTools field.
File
- ./
ds.module, line 982 - Display Suite core functions.
Code
function ds_create_entity_context($entity_type, $entity, &$contexts, $context_arguments = array()) {
ctools_include('context');
if (empty($context_arguments)) {
$context_arguments = array(
array(
'keyword' => $entity_type,
'identifier' => drupal_ucfirst($entity_type) . ' being viewed',
'id' => 1,
'name' => 'entity_id:' . $entity_type,
'settings' => array(),
),
);
}
ctools_context_get_context_from_arguments($context_arguments, $contexts, array(
$entity,
));
}