Skip to content

Commit f79f941

Browse files
committed
add a convenience method to get the parent form in Twig templates
1 parent 8848a1a commit f79f941

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Form/FormView.php

+5
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ public function setMethodRendered()
101101
$this->methodRendered = true;
102102
}
103103

104+
public function getParent(): ?self
105+
{
106+
return $this->parent;
107+
}
108+
104109
/**
105110
* Returns a child by name (implements \ArrayAccess).
106111
*

0 commit comments

Comments
 (0)