Permalink
Browse files

Merge pull request #4 from kwattro/master

Add sfentityClass Snippet
  • Loading branch information...
2 parents 4b6c412 + 53c8b55 commit ef5e6e5f35bf5ca6f401279b75c88a53ab88f4c1 @raulfraile committed Mar 30, 2012
Showing with 47 additions and 0 deletions.
  1. +23 −0 README.md
  2. +24 −0 Snippets/Doctrine/Annotations/entityclass.sublime-snippet
View
@@ -164,6 +164,29 @@ class TransformerNameTransformer implements DataTransformerInterface
*/
```
+`sfentityClass`
+
+``` php
+namespace VendorName\BundleNameBundle\Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/*
+* @ORM\Entity(repositoryClass="VendorName\BundleNameBundle\Repository\repositoryClassRepository")
+* @ORM\Table(name="table_name")
+*/
+class repositoryClass
+{
+ /**
+ * @ORM\Id
+ * @ORM\Column(type="integer")
+ * @ORM\GeneratedValue(strategy="AUTO")
+ */
+ protected $id;
+}
+```
+
`sfidcolumn`
``` php
@@ -0,0 +1,24 @@
+<snippet>
+ <content><![CDATA[namespace ${1:VendorName}\\${2:BundleName}Bundle\\Entity;
+
+use Doctrine\\ORM\\Mapping as ORM;
+use Symfony\\Component\\Validator\\Constraints as Assert;
+
+/*
+* @ORM\Entity(repositoryClass="${1}\\${2}Bundle\\Repository\\${3:repositoryClass}Repository")
+* @ORM\Table(name="${4:table_name}")
+*/
+class ${3}
+{
+ /**
+ * @ORM\Id
+ * @ORM\Column(type="integer")
+ * @ORM\GeneratedValue(strategy="AUTO")
+ */
+ protected \$id;
+}
+]]></content>
+ <tabTrigger>sfentityClass</tabTrigger>
+ <scope>source.php</scope>
+ <description>Symfony2 / Entity / Entity class</description>
+</snippet>

0 comments on commit ef5e6e5

Please sign in to comment.