Skip to content

Commit

Permalink
Merge pull request raulfraile#4 from kwattro/master
Browse files Browse the repository at this point in the history
Add sfentityClass Snippet
  • Loading branch information
raulfraile committed Mar 30, 2012
2 parents 4b6c412 + 53c8b55 commit ef5e6e5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions Snippets/Doctrine/Annotations/entityclass.sublime-snippet
Original file line number Diff line number Diff line change
@@ -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.