Inspired by Doctrine Sublime Snippets.
This repository contains Symfony object-related snippet.
First you need to install Sublime Package Control, then execute command Package Control: Add Repository
to insert this repository url https://github.com/eghojansu/symfony-snippet.git.
Or you can manually download this repository as zip/tar then extract in Sublime User Package directory.
All snippet has prefix sf
as its tab trigger, for spesific tab trigger see below.
Snippet template inspired by symfony/maker-bundle.
- Create Command (
sfcommand
) - Create Controller (
sfcontroller
) - Create Controller Method (
sfmethod
) - Render Twig on Method (
sfrendertwig
) - Create Form (
sfform
)
See Symfony constraints for available assertion snippet.
Assertion prefixed by sfass
and living in block comment scope, so you need to put your cursor inside that scope.
Snippet won't loading with tab trigger, but you can use command pallete control to insert.
Additional snippet:
- Use/import Constraint as Assert (
sfuseconstraints
)
- Array (
sfarrayproperty
) - Big Integer (
sfbigintegerproperty
) - Boolean (
sfbooleanproperty
) - Date (
sfdateproperty
) - DateTime (
sfdatetimeproperty
) - Decimal (
sfdecimalproperty
) - Integer (
sfintegerproperty
) - JSON Array (
sfjsonarrayproperty
) - Primary (
sfprimaryproperty
) - Simple Array (
sfsimplearrayproperty
) - Small Integer (
sfsmallintegerproperty
) - String (
sfstringproperty
) - Text (
sftextproperty
) - Time (
sftimeproperty
)
- One to One Uni/Bidirectional map (
sfonetoonemapped
) - One to One Bidirectional inverse (
sfonetooneinverse
) - One to One Self (
sfselfonetoone
) - One to Many (
sfonetomany
) - Many to One (
sfmanytoone
) - Many To Many Bidirectional Inverse (
sfmanytomanybiinverse
) - Many To Many Bidirectional Mapped (
sfmanytomanybimapped
) - Many To Many Self Referencing (
sfmanytomanyself
) - Many To Many Unidirectional (
sfmanytomanyuni
)
- Create Entity
- Create Repository
Happy coding,
ekokurniawan