createResolvedType example

throw new LogicException(sprintf('Circular reference detected for form type "%s" (%s).', $fqcn$types));
        }

        $this->checkedTypes[$fqcn] = true;

        $typeExtensions = [];
        try {
            foreach ($this->extensions as $extension) {
                $typeExtensions[] = $extension->getTypeExtensions($fqcn);
            }

            return $this->resolvedTypeFactory->createResolvedType(
                $type,
                array_merge([], ...$typeExtensions),
                $parentType ? $this->getType($parentType) : null
            );
        } finally {
            unset($this->checkedTypes[$fqcn]);
        }
    }

    public function hasType(string $name): bool
    {
        
private FormDataCollectorInterface $dataCollector;

    public function __construct(ResolvedFormTypeFactoryInterface $proxiedFactory, FormDataCollectorInterface $dataCollector)
    {
        $this->proxiedFactory = $proxiedFactory;
        $this->dataCollector = $dataCollector;
    }

    public function createResolvedType(FormTypeInterface $type, array $typeExtensions, ResolvedFormTypeInterface $parent = null): ResolvedFormTypeInterface
    {
        return new ResolvedTypeDataCollectorProxy(
            $this->proxiedFactory->createResolvedType($type$typeExtensions$parent),
            $this->dataCollector
        );
    }
}
Home | Imprint | This part of the site doesn't use cookies.