protected function AccountRegistration::buildError in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_user/src/AccountRegistration.php \Drupal\sms_user\AccountRegistration::buildError()
- 2.1.x modules/sms_user/src/AccountRegistration.php \Drupal\sms_user\AccountRegistration::buildError()
Build an error string from a constraint violation list.
Parameters
\Symfony\Component\Validator\ConstraintViolationListInterface $violations: A constraint violation list.
Return value
string Violation errors joined together.
2 calls to AccountRegistration::buildError()
- AccountRegistration::allUnknownNumbers in modules/
sms_user/ src/ AccountRegistration.php - Process incoming message and create a user if the phone number is unknown.
- AccountRegistration::incomingPatternMessage in modules/
sms_user/ src/ AccountRegistration.php - Creates a user if an incoming message contents matches a pattern.
File
- modules/
sms_user/ src/ AccountRegistration.php, line 329
Class
- AccountRegistration
- Defines the account registration service.
Namespace
Drupal\sms_userCode
protected function buildError(ConstraintViolationListInterface $violations) {
$error = '';
foreach ($violations as $violation) {
$error .= (string) $violation
->getMessage() . " ";
}
return strip_tags($error);
}