Beispiel #1
0
    /**
     * Adds a type.
     *
     * @param FormTypeInterface $type The type
     *
     * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
     *             form extensions or type registration in the Dependency
     *             Injection Container instead.
     */
    public function addType(FormTypeInterface $type)
    {
        $parentType = $type->getParent();

        $this->registry->addType($this->resolvedTypeFactory->createResolvedType(
            $type,
            array(),
            $parentType ? $this->registry->getType($parentType) : null
        ));
    }
 /**
  * Adds a type.
  *
  * @param FormTypeInterface $type The type
  *
  * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
  *             form extensions or type registration in the Dependency
  *             Injection Container instead.
  */
 public function addType(FormTypeInterface $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);
     $parentType = $type->getParent();
     $this->registry->addType($this->resolvedTypeFactory->createResolvedType($type, array(), $parentType ? $this->registry->getType($parentType) : null));
 }
Beispiel #3
0
 /**
  * Adds a type.
  *
  * @param FormTypeInterface $type The type
  *
  * @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
  *             {@link FormRegistryInterface::resolveType()} and
  *             {@link FormRegistryInterface::addType()} instead.
  */
 public function addType(FormTypeInterface $type)
 {
     $this->registry->addType($this->registry->resolveType($type));
 }