class DeveloperEmailUnique in Apigee Edge 8
Checks if an email address already belongs to a developer on Apigee Edge.
Plugin annotation
@Constraint(
id = "DeveloperMailUnique",
label = @Translation("Developer email unique", context = "Validation"),
type = { "email" }
)
Hierarchy
- class \Drupal\apigee_edge\Plugin\Validation\Constraint\DeveloperEmailUnique extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of DeveloperEmailUnique
File
- src/
Plugin/ Validation/ Constraint/ DeveloperEmailUnique.php, line 35
Namespace
Drupal\apigee_edge\Plugin\Validation\ConstraintView source
class DeveloperEmailUnique extends Constraint {
/**
* Error message to display.
*
* @var string
*/
public $message;
/**
* {@inheritdoc}
*/
public function __construct($options = NULL) {
parent::__construct($options);
$config = \Drupal::config('apigee_edge.developer_settings');
if ($config
->get('verification_action') == DeveloperSettingsForm::VERIFICATION_ACTION_DISPLAY_ERROR_ONLY) {
$this->message = $config
->get('display_only_error_message_content.value');
}
elseif ($config
->get('verification_action') == DeveloperSettingsForm::VERIFICATION_ACTION_VERIFY_EMAIL) {
$this->message = $config
->get('verify_email_error_message.value');
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeveloperEmailUnique:: |
public | property | Error message to display. | |
DeveloperEmailUnique:: |
public | function | Initializes the constraint with options. |