public function MappedObject::save in Salesforce Suite 5.0.x
Same name and namespace in other branches
- 8.4 modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::save()
- 8.3 modules/salesforce_mapping/src/Entity/MappedObject.php \Drupal\salesforce_mapping\Entity\MappedObject::save()
Saves an entity permanently.
When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported.
Return value
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
Throws
\Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown.
Overrides EntityBase::save
File
- modules/
salesforce_mapping/ src/ Entity/ MappedObject.php, line 122
Class
- MappedObject
- Defines a Salesforce Mapped Object entity class.
Namespace
Drupal\salesforce_mapping\EntityCode
public function save() {
$this->changed = $this
->getRequestTime();
if ($this
->isNew()) {
$this->created = $this
->getRequestTime();
}
return parent::save();
}