mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
work in progress
This commit is contained in:
@@ -89,13 +89,16 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->end() // end of notifications
|
||||
->arrayNode('phone_helper')
|
||||
->canBeUnset()
|
||||
->children()
|
||||
->scalarNode('twilio_sid')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->scalarNode('twilio_secret')
|
||||
->defaultNull()
|
||||
->canBeUnset()
|
||||
->children()
|
||||
->scalarNode('twilio_sid')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->scalarNode('twilio_secret')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->scalarNode('default_carrier_code')
|
||||
->defaultNull()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
|
@@ -139,7 +139,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* REturn true if the phoennumber is a mobile phone. Return always true
|
||||
* REturn true if the phonenumber is a mobile phone. Return always true
|
||||
* if the validation is not configured.
|
||||
*
|
||||
* @param string $phonenumber
|
||||
|
@@ -25,7 +25,7 @@ final class Templating extends AbstractExtension
|
||||
|
||||
public function formatPhonenumber(string $phonenumber): string
|
||||
{
|
||||
return $this->phonenumberHelper->format($phonenumber) ?? $phonenumber;
|
||||
return $this->phonenumberHelper->format($phonenumber);
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
|
@@ -37,6 +37,8 @@ final class ValidPhonenumber extends ConstraintValidator
|
||||
*/
|
||||
public function validate($value, Constraint $constraint)
|
||||
{
|
||||
dump($value);
|
||||
|
||||
if (false === $this->phonenumberHelper->isPhonenumberValidationConfigured()) {
|
||||
$this->logger->debug('[phonenumber] skipping validation due to not configured helper');
|
||||
|
||||
|
@@ -85,3 +85,4 @@ services:
|
||||
- "@security.token_storage"
|
||||
|
||||
Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface: '@Chill\MainBundle\Security\Resolver\CenterResolverDispatcher'
|
||||
|
||||
|
@@ -3,6 +3,8 @@ services:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Chill\MainBundle\Phonenumber\PhoneNumberHelperInterface: '@Chill\MainBundle\Phonenumber\PhonenumberHelper'
|
||||
|
||||
Chill\MainBundle\Phonenumber\PhonenumberHelper: ~
|
||||
|
||||
Chill\MainBundle\Phonenumber\Templating:
|
||||
|
Reference in New Issue
Block a user