public function Reference::preSaveRevision in Bibliography & Citation 2.0.x
Same name and namespace in other branches
- 8 modules/bibcite_entity/src/Entity/Reference.php \Drupal\bibcite_entity\Entity\Reference::preSaveRevision()
Acts on a revision before it gets saved.
Parameters
EntityStorageInterface $storage: The entity storage object.
object $record: The revision object.
Overrides ContentEntityBase::preSaveRevision
File
- modules/
bibcite_entity/ src/ Entity/ Reference.php, line 436
Class
- Reference
- Defines the Reference entity.
Namespace
Drupal\bibcite_entity\EntityCode
public function preSaveRevision(EntityStorageInterface $storage, \stdClass $record) {
parent::preSaveRevision($storage, $record);
/* @see \Drupal\node\Entity\Node::preSaveRevision() */
if (!$this
->isNewRevision() && isset($this->original) && (!isset($record->revision_log_message) || $record->revision_log_message === '')) {
$record->revision_log_message = $this->original->revision_log_message->value;
}
}