You are here

function flexiform_get_entity_namespace in Flexiform 7

Get the namespace we use for the entity

Parameters

$entity_type: The entity type e.g. node,user or taxonomy term

$entity: The entity object

Return value

A Unique namespace for the entity in this form

File

includes/flexiform.flexiform.inc, line 347
flexiform.flexiform.inc Helper function for embedding the fields into the flexiform in an arbitrary order

Code

function flexiform_get_entity_namespace($entity_type, $entity) {
  $entity_info = entity_get_info($entity_type);
  return $entity_type . '__' . $entity->{$entity_info['entity keys']['id']};
}