You are here

function globallink_entity_save in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.7 globallink_entity/globallink_entity.inc \globallink_entity_save()
  2. 7.5 globallink_entity/globallink_entity.inc \globallink_entity_save()

Saves entity.

Parameters

object $node: The entity node.

Return value

bool TRUE if successful. FALSE on failure.

1 call to globallink_entity_save()
globallink_entity_save_translated_entity_with_fields in globallink_entity/globallink_entity.inc
Saves translated entity with fields.

File

globallink_entity/globallink_entity.inc, line 1053

Code

function globallink_entity_save(&$node) {
  try {
    node_save($node);
    return TRUE;
  } catch (Exception $e) {
    watchdog('GlobalLink', 'Exception - %function - File[%file], Line[%line], Code[%code], Message[%message]', array(
      '%function' => __FUNCTION__,
      '%file' => $e
        ->getFile(),
      '%line' => $e
        ->getLine(),
      '%code' => $e
        ->getCode(),
      '%message' => $e
        ->getMessage(),
    ), WATCHDOG_ERROR);
    return FALSE;
  }
}