You are here

public function SmsDeliveryReport::save in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Entity/SmsDeliveryReport.php \Drupal\sms\Entity\SmsDeliveryReport::save()
  2. 2.1.x src/Entity/SmsDeliveryReport.php \Drupal\sms\Entity\SmsDeliveryReport::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

src/Entity/SmsDeliveryReport.php, line 264

Class

SmsDeliveryReport
Defines the SMS message delivery report entity.

Namespace

Drupal\sms\Entity

Code

public function save() {

  // Ensure a new revision is saved.
  $this
    ->setNewRevision(TRUE);
  return parent::save();
}