function mobile_tools_entity_info_alter in Mobile Tools 7.2
Same name and namespace in other branches
- 7.3 mobile_tools.module \mobile_tools_entity_info_alter()
Implementation of hook_entity_info_alter()
We provide new build modes for all entities
File
- ./
mobile_tools.module, line 191 - Functionality to ease the creation of mixed device environments.
Code
function mobile_tools_entity_info_alter(&$entity_info) {
$enable_build_mode = variable_get('mobile_tools_enable_build_mode', FALSE);
foreach ($entity_info as $entity_type => $entity) {
$entity_info[$entity_type]['view modes']['mobile'] = array(
'label' => 'Mobile',
'custom settings' => FALSE,
);
$device_groups = array(
'mobile' => 'Mobile',
);
foreach ($device_groups as $device => $device_name) {
$entity_info[$entity_type]['view modes'][$device] = array(
'label' => $device_name,
'custom settings' => FALSE,
);
}
}
}