You are here

protected function UserRestrictionsManager::setError in User restrictions 8

Set error message for a specific restriction type.

Parameters

string $type: Type of restriction, i.e. "name".

string $message: Error message.

Return value

\Drupal\user_restrictions\UserRestrictionsManagerInterface The service for chaining.

1 call to UserRestrictionsManager::setError()
UserRestrictionsManager::matchesRestrictions in src/UserRestrictionsManager.php
Check if a the given data matches any restrictions.

File

src/UserRestrictionsManager.php, line 88

Class

UserRestrictionsManager
Defines the user restriction manager.

Namespace

Drupal\user_restrictions

Code

protected function setError($type, $message) {
  $this->errors[$type] = $message;
  return $this;
}