|
@@ -137,6 +137,20 @@ class Controller extends ContainerAware
|
|
return $this->get('form.factory')->createBuilder('form', $data, $options);
|
|
return $this->get('form.factory')->createBuilder('form', $data, $options);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Shortcut to return the Doctrine Registry class
|
|
|
|
+ *
|
|
|
|
+ * @return Symfony\Bundle\DoctrineBundle\Registry
|
|
|
|
+ */
|
|
|
|
+ public function getDoctrine()
|
|
|
|
+ {
|
|
|
|
+ if (!$this->has('doctrine')) {
|
|
|
|
+ throw new \LogicException('The DoctrineBundle is not installed in your application.');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return $this->get('doctrine');
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Returns true if the service id is defined.
|
|
* Returns true if the service id is defined.
|
|
*
|
|
*
|