getTargetForm example

do {
            if ($parentType->getInnerType() instanceof RepeatedType) {
                return $parentForm;
            }
        } while ($parentType = $parentType->getParent());

        return $form;
    }

    private function getUser(FormInterface $form): PasswordAuthenticatedUserInterface
    {
        $parent = $this->getTargetForm($form)->getParent();

        if (!($user = $parent?->getData()) || !$user instanceof PasswordAuthenticatedUserInterface) {
            throw new InvalidConfigurationException(sprintf('The "hash_property_path" option only supports "%s" objects, "%s" given.', PasswordAuthenticatedUserInterface::classget_debug_type($user)));
        }

        return $user;
    }

    private function assertNotMapped(FormInterface $form): void
    {
        if ($this->getTargetForm($form)->getConfig()->getMapped()) {
            
Home | Imprint | This part of the site doesn't use cookies.