function hook_entity_presave


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 system.api.php hook_entity_presave($entity, $type)
cle7 system.api.php hook_entity_presave($entity, $type)
elmsmedia7 system.api.php hook_entity_presave($entity, $type)
icor7 system.api.php hook_entity_presave($entity, $type)
meedjum_blog7 system.api.php hook_entity_presave($entity, $type)
mooc7 system.api.php hook_entity_presave($entity, $type)

Act on an entity before it is about to be created or updated.


$entity: The entity object.

$type: The type of entity being saved (i.e. node, user, comment).

Related topics

8 functions implement hook_entity_presave()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

cis_connector_entity_presave in sites/all/modules/elmsln_contrib/cis_connector/cis_connector.module
Implements hook_entity_presave().
cis_example_cis_entity_presave in sites/all/modules/_my_modules/cis_examples/cis_example_cis/cis_example_cis.module
Implements hook_entity_presave().
cis_example_lms_sync_entity_presave in sites/all/modules/_my_modules/cis_implementation_example/cis_example_lms_sync/cis_example_lms_sync.module
Implements hook_entity_presave().
cis_section_entity_presave in sites/all/modules/elmsln_contrib/cis_connector/features/cis_section/cis_section.module
Implements hook_entity_presave().
entity_crud_hook_test_entity_presave in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_entity_presave().

... See full list

9 invocations of hook_entity_presave()
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
EntityAPIController::save in sites/all/modules/ulmus/entity/includes/
Implements EntityAPIControllerInterface.
field_attach_presave in modules/field/
Perform necessary operations just before fields data get saved.
file_save in includes/
Saves a file object to the database.
node_save in modules/node/node.module
Saves changes to a node or adds a new node.

... See full list


modules/system/system.api.php, line 316
Hooks provided by Drupal core and the System module.


function hook_entity_presave($entity, $type) {
  $entity->changed = REQUEST_TIME;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.