You are here

public function MapEvent::addError in Sophron 8

Adds an error.

Parameters

string $method: An identifier of the method where the error occurred.

array $args: An array of arguments passed to the method.

string $type: An identifier of the type of the error.

string $message: A messagge detailing the error.

File

src/Event/MapEvent.php, line 67

Class

MapEvent
Defines the MapEvent.

Namespace

Drupal\sophron\Event

Code

public function addError($method, array $args, $type, $message) {
  $this->errors[] = [
    'method' => $method,
    'args' => $args,
    'type' => $type,
    'message' => $message,
  ];
  return $this;
}