/** * @param ResolvedFormTypeInterface|null $formType * @param array &$types */ public static function typeAncestryForType(ResolvedFormTypeInterface $formType = null, array &$types) { if (!$formType instanceof ResolvedFormTypeInterface) { return; } $types[] = $formType->getName(); self::typeAncestryForType($formType->getParent(), $types); }
public static function isType(ResolvedFormTypeInterface $type, $typeName) { do { if ($type->getName() === $typeName) { return true; } $type = $type->getParent(); } while ($type !== null); return false; }
private function isFieldSingleUpload(ResolvedFormTypeInterface $formTypeInterface = null) { if ($formTypeInterface == null) { return false; } if ($formTypeInterface->getName() == 'afe_single_upload') { return true; } return $this->isFieldSingleUpload($formTypeInterface->getParent()); }
/** * {@inheritdoc} */ public function addType(ResolvedFormTypeInterface $type) { trigger_error('addType() is deprecated since version 2.1 and will be removed in 2.3. Use form extensions or type registration in the Dependency Injection Container instead.', E_USER_DEPRECATED); $this->types[$type->getName()] = $type; }
/** * {@inheritdoc} */ public function getName() { return $this->proxiedType->getName(); }
/** * {@inheritdoc} */ public function addType(ResolvedFormTypeInterface $type) { $this->types[$type->getName()] = $type; }