public function SmsEntityPhoneNumber::addPhoneNumber in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Event/SmsEntityPhoneNumber.php \Drupal\sms\Event\SmsEntityPhoneNumber::addPhoneNumber()
- 2.1.x src/Event/SmsEntityPhoneNumber.php \Drupal\sms\Event\SmsEntityPhoneNumber::addPhoneNumber()
Add phone number to this event.
Parameters
string $phone_number: A phone number to add to this event.
Return value
$this Return this event for chaining.
File
- src/
Event/ SmsEntityPhoneNumber.php, line 92
Class
- SmsEntityPhoneNumber
- Event fired when resolving phone numbers for an entity.
Namespace
Drupal\sms\EventCode
public function addPhoneNumber($phone_number) {
if (!in_array($phone_number, $this->phoneNumbers)) {
$this->phoneNumbers[] = $phone_number;
}
return $this;
}