You are here

function _sms_entity_postsave in SMS Framework 8

Same name and namespace in other branches
  1. 2.x sms.module \_sms_entity_postsave()
  2. 2.1.x sms.module \_sms_entity_postsave()

Respond to saving entities after they have been written to storage.

@link https://www.drupal.org/node/2221347

See also

sms_entity_insert()

sms_entity_update()

2 calls to _sms_entity_postsave()
sms_entity_insert in ./sms.module
Implements hook_entity_insert().
sms_entity_update in ./sms.module
Implements hook_entity_update().

File

./sms.module, line 57
Provides hooks for SMS Framework.

Code

function _sms_entity_postsave(EntityInterface $entity) {
  if ($entity instanceof ContentEntityInterface) {

    /** @var \Drupal\sms\Provider\PhoneNumberVerificationInterface $phone_number_verification_provider */
    $phone_number_verification_provider = \Drupal::service('sms.phone_number.verification');
    $phone_number_verification_provider
      ->updatePhoneVerificationByEntity($entity);
  }
}