Skip to content

Commit 17abb97

Browse files
committed
Remove the form reference stores in the orderer
1 parent e4ce5b3 commit 17abb97

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/Symfony/Component/Form/FormOrderer.php

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
*/
2121
class FormOrderer implements FormOrdererInterface
2222
{
23-
/**
24-
* @var FormInterface
25-
*/
26-
private $form;
27-
2823
/**
2924
* @var array
3025
*/
@@ -55,9 +50,9 @@ class FormOrderer implements FormOrdererInterface
5550
*/
5651
public function order(FormInterface $form)
5752
{
58-
$this->reset($form);
53+
$this->reset();
5954

60-
foreach ($this->form as $child) {
55+
foreach ($form as $child) {
6156
$position = $child->getConfig()->getPosition();
6257

6358
if (empty($position)) {
@@ -233,7 +228,7 @@ private function finishWeight(FormInterface $form, $weight, $position = null)
233228
*/
234229
private function processDiffered(FormInterface $form, $differed, $position)
235230
{
236-
if (!$this->form->has($differed)) {
231+
if (!$form->getParent()->has($differed)) {
237232
throw new InvalidConfigurationException(sprintf('The "%s" form is configured to be placed just %s the form "%s" but the form "%s" does not exist.', $form->getName(), $position, $differed, $differed));
238233
}
239234

@@ -299,13 +294,9 @@ private function detectedSymmetricDiffered($name, $differed, $position)
299294

300295
/**
301296
* Resets the orderer.
302-
*
303-
* @param FormInterface $form The form.
304297
*/
305-
private function reset(FormInterface $form)
298+
private function reset()
306299
{
307-
$this->form = $form;
308-
309300
$this->weights = array();
310301
$this->differed = array(
311302
'before' => array(),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy