aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php')
-rw-r--r--vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php
deleted file mode 100644
index 24fdc8bb..00000000
--- a/vendor/symfony/form/Symfony/Component/Form/Util/VirtualFormAwareIterator.php
+++ /dev/null
@@ -1,50 +0,0 @@
1<?php
2
3/*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Symfony\Component\Form\Util;
13
14/**
15 * Iterator that returns only forms from a form tree that do not inherit their
16 * parent data.
17 *
18 * If the iterator encounters a form that inherits its parent data, it enters
19 * the form and traverses its children as well.
20 *
21 * @author Bernhard Schussek <bschussek@gmail.com>
22 *
23 * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
24 * {@link InheritDataAwareIterator} instead.
25 */
26class VirtualFormAwareIterator extends \ArrayIterator implements \RecursiveIterator
27{
28 /**
29 * Creates a new iterator.
30 *
31 * @param \Symfony\Component\Form\FormInterface[] $forms An array
32 */
33 public function __construct(array $forms)
34 {
35 // Uncomment this as soon as the deprecation note should be shown
36 // trigger_error('VirtualFormAwareIterator is deprecated since version 2.3 and will be removed in 3.0. Use InheritDataAwareIterator instead.', E_USER_DEPRECATED);
37
38 parent::__construct($forms);
39 }
40
41 public function getChildren()
42 {
43 return new static($this->current()->all());
44 }
45
46 public function hasChildren()
47 {
48 return $this->current()->getConfig()->getInheritData();
49 }
50}