public function CiviEntityStorage::civiPreSave in CiviCRM Entity 8.3
Allows CiviCRM hook to invoke presave.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity to save.
Throws
\Drupal\Core\Entity\EntityStorageException If the entity identifier is invalid.
See also
\Drupal\Core\Entity\ContentEntityStorageBase::doPreSave
File
- src/
CiviEntityStorage.php, line 704
Class
- CiviEntityStorage
- Defines entity class for external CiviCRM entities.
Namespace
Drupal\civicrm_entityCode
public function civiPreSave(EntityInterface $entity) {
if (!empty($entity->drupal_crud)) {
return;
}
$this
->doPreSave($entity);
}