Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. BaseConstraint.php

function BaseConstraint::addErrors

10 calls to BaseConstraint::addErrors()
Constraint::checkArray in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php
Validates an array
Constraint::checkEnum in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php
Checks a enum element
Constraint::checkFormat in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php
Checks format of an element
Constraint::checkNumber in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php
Checks a number element
Constraint::checkObject in vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/Constraint.php
Validates an object

... See full list

File

vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php, line 68

Class

BaseConstraint
A more basic constraint definition - used for the public interface to avoid exposing library internals.

Namespace

JsonSchema\Constraints

Code

public function addErrors(array $errors) {
    if ($errors) {
        $this->errors = array_merge($this->errors, $errors);
        $errorMask =& $this->errorMask;
        array_walk($errors, function ($error) use (&$errorMask) {
            if (isset($error['context'])) {
                $errorMask |= $error['context'];
            }
        });
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal