private function initTypeExtensions(): void
{ $this->typeExtensions =
[];
foreach ($this->
loadTypeExtensions() as $extension) { if (!
$extension instanceof FormTypeExtensionInterface
) { throw new UnexpectedTypeException($extension, FormTypeExtensionInterface::
class);
} foreach ($extension::
getExtendedTypes() as $extendedType) { $this->typeExtensions
[$extendedType][] =
$extension;
} } } /**
* Initializes the type guesser.
*
* @throws UnexpectedTypeException if the type guesser is not an instance of FormTypeGuesserInterface
*/
private function initTypeGuesser(): void
{