function field_attach_presave

cis7 field.attach.inc field_attach_presave($entity_type, $entity)
cle7 field.attach.inc field_attach_presave($entity_type, $entity)
elmsmedia7 field.attach.inc field_attach_presave($entity_type, $entity)
icor7 field.attach.inc field_attach_presave($entity_type, $entity)
meedjum_blog7 field.attach.inc field_attach_presave($entity_type, $entity)
mooc7 field.attach.inc field_attach_presave($entity_type, $entity)

Perform necessary operations just before fields data get saved.

We take no specific action here, we just give other modules the opportunity to act.

Parameters

$entity_type: The type of $entity; e.g. 'node' or 'user'.

$entity: The entity with fields to process.

Related topics

12 calls to field_attach_presave()
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
field_test_entity_save in modules/field/tests/field_test.entity.inc
Saves a test_entity.
file_entity_file_presave in sites/all/modules/ulmus/file_entity/file_entity.file.inc
Implements hook_file_presave().
LTIToolProviderConsumerEntityController::save in sites/all/modules/ulmus/lti_tool_provider/LTIToolProviderConsumerEntityController.class.php
Save a consumer.
LTIToolProviderMembershipsContextEntityController::save in sites/all/modules/ulmus/lti_tool_provider/lti_tool_provider_memberships/LTIToolProviderMembershipsContextEntityController.class.php
Save a memberships context entity.

... See full list

File

modules/field/field.attach.inc, line 913
Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.

Code

function field_attach_presave($entity_type, $entity) {
  _field_invoke('presave', $entity_type, $entity);

  // Let other modules act on presaving the entity.
  module_invoke_all('field_attach_presave', $entity_type, $entity);
}