2017-25 © Pedro Peláez
 

neos-package phoneutil

Utilities to deal with phone numbers

image

onedrop/phoneutil

Utilities to deal with phone numbers

  • Thursday, October 5, 2017
  • by onedrop
  • Repository
  • 2 Watchers
  • 2 Stars
  • 738 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

Onedrop.PhoneUtil

This Neos package provides some functionality to deal with phone numbers in your daily work with Flow and Neos., (*1)

Validation

<?php
namespace Vendor\Package\Domain\Model;
use Neos\Flow\Annotations as Flow;

class SomeEntity {
    /**
     * @var string
     * @Flow\Validate(type="Onedrop.PhoneUtil:PhoneNumber")
     */
     protected $phoneNumber;
}

Eel utility

Reformat into daillable number (output as tel: link):, (*2)

phoneNumber = ${Phone.toDiallableNumber(q(node).property('number'), 'DE')}
# output '+4989123456789'

Geocode the phone number:, (*3)

city = ${Phone.geocode(q(node).property('number'), 'DE')}
# output 'München'
city = ${Phone.geocode(q(node).property('number'), 'EN')}
# output 'Munich'

Extract numbers from a text:, (*4)

phoneNumbersInText = ${Phone.extractNumbers(q(node).property('description'), 'DE')}
# outputs a RawArray containing the the possible phone numbers (unmodified)

Typeahead ajax formatting

A special endpoint __phone/format is provided., (*5)

The Versions

05/10 2017

dev-master

9999999-dev

Utilities to deal with phone numbers

  Sources   Download

MIT

The Requires

 

by Hans Hoechtl

05/10 2017

0.1.1

0.1.1.0

Utilities to deal with phone numbers

  Sources   Download

MIT

The Requires

 

by Hans Hoechtl

05/10 2017

0.1.0

0.1.0.0

Utilities to deal with phone numbers

  Sources   Download

MIT

The Requires

 

by Hans Hoechtl