diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index c8acaf825fcc0..98c463b29539b 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -285,6 +285,16 @@ public function getParent() return $this->parent; } + /** + * Returns whether the form has a parent. + * + * @return bool + */ + public function hasParent() + { + return null !== $this->parent; + } + /** * {@inheritdoc} */