You are here

function fc_entity_insert in Field Complete 7

Implements hook_entity_insert().

File

./fc.module, line 105
Field Complete - Provides field-based completeness for any entity.

Code

function fc_entity_insert($entity, $entity_type) {
  if (fc_entity_is_enabled($entity_type)) {
    $entity->fc = fcComplete::build($entity_type, $entity);
    $entity->fc
      ->completeness();
    $entity->fc
      ->save();
  }
}