[Form] Changed name of VirtualFormIterator to VirtualFormAwareIterator
This commit is contained in:
parent
b180319371
commit
29d412c15a
@ -12,7 +12,7 @@
|
|||||||
namespace Symfony\Component\Form\DataMapper;
|
namespace Symfony\Component\Form\DataMapper;
|
||||||
|
|
||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
use Symfony\Component\Form\VirtualFormIterator;
|
use Symfony\Component\Form\VirtualFormAwareIterator;
|
||||||
use Symfony\Component\Form\Exception\FormException;
|
use Symfony\Component\Form\Exception\FormException;
|
||||||
|
|
||||||
class PropertyPathMapper implements DataMapperInterface
|
class PropertyPathMapper implements DataMapperInterface
|
||||||
@ -39,7 +39,7 @@ class PropertyPathMapper implements DataMapperInterface
|
|||||||
throw new FormException(sprintf('Form data should be instance of %s', $this->dataClass));
|
throw new FormException(sprintf('Form data should be instance of %s', $this->dataClass));
|
||||||
}
|
}
|
||||||
|
|
||||||
$iterator = new VirtualFormIterator($forms);
|
$iterator = new VirtualFormAwareIterator($forms);
|
||||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||||
|
|
||||||
foreach ($iterator as $form) {
|
foreach ($iterator as $form) {
|
||||||
@ -59,7 +59,7 @@ class PropertyPathMapper implements DataMapperInterface
|
|||||||
|
|
||||||
public function mapFormsToData(array $forms, &$data)
|
public function mapFormsToData(array $forms, &$data)
|
||||||
{
|
{
|
||||||
$iterator = new VirtualFormIterator($forms);
|
$iterator = new VirtualFormAwareIterator($forms);
|
||||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||||
|
|
||||||
foreach ($iterator as $form) {
|
foreach ($iterator as $form) {
|
||||||
|
@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Validator;
|
|||||||
|
|
||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
use Symfony\Component\Form\FormError;
|
use Symfony\Component\Form\FormError;
|
||||||
use Symfony\Component\Form\VirtualFormIterator;
|
use Symfony\Component\Form\VirtualFormAwareIterator;
|
||||||
use Symfony\Component\Form\Exception\FormException;
|
use Symfony\Component\Form\Exception\FormException;
|
||||||
use Symfony\Component\Validator\ValidatorInterface;
|
use Symfony\Component\Validator\ValidatorInterface;
|
||||||
use Symfony\Component\Validator\ExecutionContext;
|
use Symfony\Component\Validator\ExecutionContext;
|
||||||
@ -79,7 +79,7 @@ class DelegatingValidator implements FormValidatorInterface
|
|||||||
$mapping['/^'.preg_quote($formPath . 'data.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
|
$mapping['/^'.preg_quote($formPath . 'data.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
$iterator = new VirtualFormIterator($form->getChildren());
|
$iterator = new VirtualFormAwareIterator($form->getChildren());
|
||||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||||
|
|
||||||
foreach ($iterator as $child) {
|
foreach ($iterator as $child) {
|
||||||
@ -116,7 +116,7 @@ class DelegatingValidator implements FormValidatorInterface
|
|||||||
$mapping['/^'.preg_quote($dataPath . '.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
|
$mapping['/^'.preg_quote($dataPath . '.' . $nestedDataPath).'(?!\w)/'] = $namePath . $nestedNamePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
$iterator = new VirtualFormIterator($form->getChildren());
|
$iterator = new VirtualFormAwareIterator($form->getChildren());
|
||||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||||
|
|
||||||
foreach ($iterator as $child) {
|
foreach ($iterator as $child) {
|
||||||
@ -139,7 +139,7 @@ class DelegatingValidator implements FormValidatorInterface
|
|||||||
$namePath .= '.';
|
$namePath .= '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
$iterator = new VirtualFormIterator($form->getChildren());
|
$iterator = new VirtualFormAwareIterator($form->getChildren());
|
||||||
$iterator = new \RecursiveIteratorIterator($iterator);
|
$iterator = new \RecursiveIteratorIterator($iterator);
|
||||||
|
|
||||||
foreach ($iterator as $child) {
|
foreach ($iterator as $child) {
|
||||||
|
@ -19,7 +19,7 @@ namespace Symfony\Component\Form;
|
|||||||
*
|
*
|
||||||
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
|
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
|
||||||
*/
|
*/
|
||||||
class VirtualFormIterator extends \ArrayIterator implements \RecursiveIterator
|
class VirtualFormAwareIterator extends \ArrayIterator implements \RecursiveIterator
|
||||||
{
|
{
|
||||||
public function getChildren()
|
public function getChildren()
|
||||||
{
|
{
|
Reference in New Issue
Block a user