summaryrefslogtreecommitdiff
path: root/luasnip_snippets/php-symfony2.json
diff options
context:
space:
mode:
authorVito G. Graffagnino <vito@graffagnino.xyz>2022-08-30 16:06:22 +0100
committerVito G. Graffagnino <vito@graffagnino.xyz>2022-08-30 16:06:22 +0100
commitf1eabbaa1b4ff1836d0ee8335b31d009203f3775 (patch)
treebbe77eacaef8ab8a5999e517c3006973c9e3e44c /luasnip_snippets/php-symfony2.json
parent823302458ec6c53455a3f34674415c43ce6a3187 (diff)
fixed zathura integration with texlab using nvim-texlabconfig
Diffstat (limited to 'luasnip_snippets/php-symfony2.json')
-rw-r--r--luasnip_snippets/php-symfony2.json97
1 files changed, 97 insertions, 0 deletions
diff --git a/luasnip_snippets/php-symfony2.json b/luasnip_snippets/php-symfony2.json
new file mode 100644
index 0000000..d7776f9
--- /dev/null
+++ b/luasnip_snippets/php-symfony2.json
@@ -0,0 +1,97 @@
+{
+ "sfa": {
+ "prefix": "sfa",
+ "description": "Symfony 2 Controller action",
+ "body": [
+ "/**",
+ "* @Route(\"/${1:route_name}\", name=\"$1\")",
+ "* @Template()",
+ "*/",
+ "public function $1Action($2)",
+ "{",
+ "\t$3",
+ "\treturn ${4:[];}$0",
+ "\\}"
+ ]
+ },
+ "act": {
+ "prefix": "act",
+ "description": "Symfony2 action",
+ "body": [
+ "/**",
+ " * @Route(\"$3\", name=\"$4\")",
+ " * @Method({${5:\"POST\"}\\})",
+ " * @Template()",
+ " */",
+ "public function $1Action($2)",
+ "{",
+ "\t$6",
+ "\\}"
+ ]
+ },
+ "redir": {
+ "prefix": "redir",
+ "description": "Symfony2 redirect",
+ "body": "\\$this->redirect(\\$this->generateUrl('$1', $2));"
+ },
+ "usecontroller": {
+ "prefix": "usecontroller",
+ "description": "Symfony2 use Symfony\\..\\Controller",
+ "body": "use Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;$1"
+ },
+ "usereauest": {
+ "prefix": "usereauest",
+ "description": "Symfony2 use Symfony\\..\\Request",
+ "body": "use Symfony\\Component\\HttpFoundation\\Request;$1"
+ },
+ "useroute": {
+ "prefix": "useroute",
+ "description": "Symfony2 use Sensio\\..\\Route",
+ "body": "use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;$1"
+ },
+ "useresponse": {
+ "prefix": "useresponse",
+ "description": "Symfony2 use Symfony\\..\\Response",
+ "body": "use Symfony\\Component\\HttpFoundation\\Response;$1"
+ },
+ "usefile": {
+ "prefix": "usefile",
+ "description": "Symfony2 use Symfony\\..\\File",
+ "body": "use Symfony\\Component\\HttpFoundation\\File\\UploadedFile;$1"
+ },
+ "useassert": {
+ "prefix": "useassert",
+ "description": "Symfony2 use Symfony\\..\\Constraints as Assert",
+ "body": "use Symfony\\Component\\Validator\\Constraints as Assert;$1"
+ },
+ "usetemplate": {
+ "prefix": "usetemplate",
+ "description": "Symfony2 use Sensio\\..\\Template",
+ "body": "use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Template;$1"
+ },
+ "usecache": {
+ "prefix": "usecache",
+ "description": "Symfony2 use Sensio\\..\\Cache",
+ "body": "use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Cache;$1"
+ },
+ "usemethod": {
+ "prefix": "usemethod",
+ "description": "Symfony2 use Sensio\\..\\Method",
+ "body": "use Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Method;$1"
+ },
+ "usearray": {
+ "prefix": "usearray",
+ "description": "Symfony2 use Doctrine\\..\\ArrayCollection",
+ "body": "use Doctrine\\Common\\Collections\\ArrayCollection;$1"
+ },
+ "useorm": {
+ "prefix": "useorm",
+ "description": "Symfony2 use Doctrine\\..\\Mapping as ORM",
+ "body": "use Doctrine\\ORM\\Mapping as ORM;$1"
+ },
+ "usesecure": {
+ "prefix": "usesecure",
+ "description": "Symfony2 use JMS\\..\\Secure",
+ "body": "use JMS\\SecurityExtraBundle\\Annotation\\Secure;$1"
+ }
+}