function slickgrid_get_entity_keys in Slickgrid 7
Same name and namespace in other branches
- 7.2 includes/slickgrid_views_plugin.inc \slickgrid_get_entity_keys()
2 calls to slickgrid_get_entity_keys()
- slickgrid_callback_clone in includes/
slickgrid.callbacks.inc - Callback function - clone an entity
- slickgrid_views_plugin::field_is_editable in includes/
slickgrid_views_plugin.inc
File
- ./
slickgrid.module, line 470
Code
function slickgrid_get_entity_keys($entity_type = null, $keys_to_ignore = array(
'label',
)) {
$entity_keys = array();
if ($entity_type) {
$entities_info = array(
entity_get_info($entity_type),
);
}
else {
$entities_info = entity_get_info();
}
foreach ($entities_info as $entity_info) {
foreach ($keys_to_ignore as $key_to_ignore) {
unset($entity_info['entity keys'][$key_to_ignore]);
}
$entity_keys += array_values($entity_info['entity keys']);
}
return $entity_keys;
}