function sms_entity_delete in SMS Framework 8
Same name and namespace in other branches
- 2.x sms.module \sms_entity_delete()
- 2.1.x sms.module \sms_entity_delete()
Implements hook_entity_delete().
File
- ./
sms.module, line 42 - Provides hooks for SMS Framework.
Code
function sms_entity_delete(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
->deletePhoneVerificationByEntity($entity);
}
}