You are here

public function Name::getErrorMessage in User restrictions 8

Get error message displayed to the user.

Return value

string Error message.

Overrides UserRestrictionTypeBase::getErrorMessage

File

src/Plugin/UserRestrictionType/Name.php, line 41

Class

Name
Defines a restriction type by username.

Namespace

Drupal\user_restrictions\Plugin\UserRestrictionType

Code

public function getErrorMessage() {
  return $this
    ->t('The name %name is reserved, and cannot be used.', [
    '%name' => $this->name,
  ]);
}