function InternalViolation::__set

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Field/InternalViolation.php \Drupal\Core\Field\InternalViolation::__set()
  2. 10 core/lib/Drupal/Core/Field/InternalViolation.php \Drupal\Core\Field\InternalViolation::__set()

File

core/lib/Drupal/Core/Field/InternalViolation.php, line 61

Class

InternalViolation
Wraps a violation to allow arrayPropertyPath to be deprecated.

Namespace

Drupal\Core\Field

Code

public function __set(string $name, $value) : void {
    if ($name === 'arrayPropertyPath') {
        $this->arrayPropertyPath = $value;
        return;
    }
    @trigger_error('Setting dynamic properties on violations is deprecated in drupal:9.5.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3307919', E_USER_DEPRECATED);
    $this->properties[$name] = $value;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.