class DeveloperToUserConversionUserNameAlreadyTakenException in Apigee Edge 8
Throw when developer's username is already taken in Drupal.
Hierarchy
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\UserDeveloperConversionException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversionException
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversationInvalidValueException
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversionUserNameAlreadyTakenException
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversationInvalidValueException
- class \Drupal\apigee_edge\Exception\DeveloperToUserConversionException
- class \Drupal\apigee_edge\Exception\UserDeveloperConversionException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\RuntimeException implements ApigeeEdgeExceptionInterface
Expanded class hierarchy of DeveloperToUserConversionUserNameAlreadyTakenException
File
- src/
Exception/ DeveloperToUserConversionUserNameAlreadyTakenException.php, line 29
Namespace
Drupal\apigee_edge\ExceptionView source
class DeveloperToUserConversionUserNameAlreadyTakenException extends DeveloperToUserConversationInvalidValueException {
/**
* DeveloperToUserConversionUserNameAlreadyTakenException constructor.
*
* @param \Drupal\apigee_edge\Entity\DeveloperInterface $developer
* Developer entity.
* @param \Symfony\Component\Validator\ConstraintViolationInterface $violation
* Constraint violation.
* @param string $message
* Exception message.
* @param int $code
* Error code.
* @param \Throwable|null $previous
* Previous exception.
*/
public function __construct(DeveloperInterface $developer, ConstraintViolationInterface $violation, string $message = 'The username "@username" is already taken in Drupal.', int $code = 0, ?\Throwable $previous = NULL) {
$message = strtr($message, [
'@username' => $developer
->getUserName(),
]);
parent::__construct('username', 'name', $violation, $developer, $message, $code, $previous);
}
}