compiler->compileRef($this->ref, $this->baseNsid); if (!$schema instanceof SchemaInterface) { $context->addViolation(\sprintf('Unable to resolve lexicon ref "%s".', $this->ref), 'unresolved_ref'); return $value; } return $schema->validateValue($value, $context); } /** * Returns the default value declared by the schema. */ public function defaultValue(): bool|int|string|null { if ($this->resolvingDefault) { return NULL; } $this->resolvingDefault = TRUE; try { $schema = $this->compiler->compileRef($this->ref, $this->baseNsid); return $schema instanceof DefaultValueSchemaInterface ? $schema->defaultValue() : NULL; } finally { $this->resolvingDefault = FALSE; } } }