You are here

function eck_entity_presave in Entity Construction Kit (ECK) 7.2

Same name and namespace in other branches
  1. 7.3 eck.module \eck_entity_presave()

Implements hook_entity_presave().

File

./eck.module, line 688

Code

function eck_entity_presave($entity, $entity_type) {
  $entity_type = EntityType::loadByName($entity_type);

  // This is an eck entity.
  if ($entity_type) {
    eck_property_behavior_invoke_plugin($entity_type, 'entity_save', array(
      'entity' => $entity,
    ));
  }
}