This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Form/FormBuilderInterface.php
Christian Flothmann 80b114e66b Merge branch '2.8' into 3.2
* 2.8: (40 commits)
  Show exception is checked twice in ExceptionController of twig
  allow SSI fragments configuration in XML files
  Display a better error message when the toolbar cannot be displayed
  render hidden _method field in form_rest()
  return fallback locales whenever possible
  [Console] Fix catching exception type in QuestionHelper
  [WebProfilerBundle] Eliminate line wrap on count columnt (routing)
  [Routing] Fix XmlFileLoader exception message
  [Translation] Fix FileLoader::loadResource() php doc
  Sessions: configurable "use_strict_mode" option for NativeSessionStorage
  [FrameworkBundle] [Command] Clean bundle directory, fixes #23177
  Reset redirectCount when throwing exception
  [TwigBundle] Remove template.xml services when templating is disabled
  add content-type header on exception response
  Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
  Fix two edge cases in ResponseCacheStrategy
  [Routing] Expose request in route conditions, if needed and possible
  [Routing] Expose request in route conditions, if needed and possible
  [Translation][FrameworkBundle] Fix resource loading order inconsistency reported in #23034
  [Filesystem] added workaround in Filesystem::rename for PHP bug
  ...
2017-06-23 08:35:45 +02:00

88 lines
2.1 KiB
PHP

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuilderInterface
{
/**
* Adds a new field to this group. A field must have a unique name within
* the group. Otherwise the existing field is overwritten.
*
* If you add a nested group, this group should also be represented in the
* object hierarchy.
*
* @param string|int|FormBuilderInterface $child
* @param string|null $type
* @param array $options
*
* @return self
*/
public function add($child, $type = null, array $options = array());
/**
* Creates a form builder.
*
* @param string $name The name of the form or the name of the property
* @param string|null $type The type of the form or null if name is a property
* @param array $options The options
*
* @return self
*/
public function create($name, $type = null, array $options = array());
/**
* Returns a child by name.
*
* @param string $name The name of the child
*
* @return self
*
* @throws Exception\InvalidArgumentException if the given child does not exist
*/
public function get($name);
/**
* Removes the field with the given name.
*
* @param string $name
*
* @return self
*/
public function remove($name);
/**
* Returns whether a field with the given name exists.
*
* @param string $name
*
* @return bool
*/
public function has($name);
/**
* Returns the children.
*
* @return array
*/
public function all();
/**
* Creates the form.
*
* @return FormInterface The form
*/
public function getForm();
}