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/FieldGroupInterface.php

44 lines
1.3 KiB
PHP
Raw Normal View History

<?php
2010-10-02 11:38:11 +01:00
/*
* This file is part of the Symfony package.
2010-10-02 11:38:11 +01:00
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2010-10-02 11:38:11 +01:00
*/
namespace Symfony\Component\Form;
/**
* A field group bundling multiple form fields
*
* @author Bernhard Schussek <bernhard.schussek@symfony-project.com>
*/
interface FieldGroupInterface extends FieldInterface, \ArrayAccess, \Traversable, \Countable
{
/**
* Returns whether this field group is virtual
*
* Virtual field groups are skipped when mapping property paths of a form
* tree to an object.
*
* Example:
*
* <code>
* $group = new FieldGroup('address');
* $group->add(new TextField('street'));
* $group->add(new TextField('postal_code'));
* $form->add($group);
* </code>
*
* If $group is non-virtual, the fields "street" and "postal_code"
* are mapped to the property paths "address.street" and
* "address.postal_code". If $group is virtual though, the fields are
* mapped directly to "street" and "postal_code".
*
* @return Boolean Whether the group is virtual
*/
public function isVirtual();
}