add snippets for javascript, markdown, php and xml
This commit is contained in:
parent
9699e53627
commit
ca892f0fcc
|
@ -3,3 +3,9 @@ function $1($2) {
|
|||
$3
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet cc "function" bi
|
||||
/**
|
||||
* $1
|
||||
*/
|
||||
endsnippet
|
||||
|
|
|
@ -7,3 +7,11 @@ endsnippet
|
|||
snippet img "image" b
|
||||
![$2]($1 "$2")
|
||||
endsnippet
|
||||
|
||||
snippet fr "Fragment option"
|
||||
<!-- .element: class="fragment" -->
|
||||
endsnippet
|
||||
|
||||
snippet sl "Slider option"
|
||||
<!-- .slide: data-menu-title="" data-background-image="" data-transition="" -->
|
||||
endsnippet
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
snippet pf "Create a public function" b
|
||||
/*
|
||||
/**
|
||||
* $3.
|
||||
*
|
||||
* $4
|
||||
|
@ -11,7 +11,7 @@ public function $1($2)
|
|||
endsnippet
|
||||
|
||||
snippet ppf "Create a protected function" b
|
||||
/*
|
||||
/**
|
||||
* $3.
|
||||
*
|
||||
* $4
|
||||
|
@ -23,7 +23,7 @@ protected function $1($2)
|
|||
endsnippet
|
||||
|
||||
snippet pvf "Create a private function" b
|
||||
/*
|
||||
/**
|
||||
* $3.
|
||||
*
|
||||
* $4
|
||||
|
@ -41,7 +41,7 @@ $1
|
|||
endsnippet
|
||||
|
||||
snippet gs "Getter and setter"
|
||||
/*
|
||||
/**
|
||||
* Set the value of "$1".
|
||||
*
|
||||
* @param $2 \$$1
|
||||
|
@ -55,7 +55,7 @@ public function set${1/\w+\s*/\u$0/g}(\$$1)
|
|||
return \$this;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* Get the value of "$1".
|
||||
*
|
||||
* @return $2
|
||||
|
@ -366,3 +366,19 @@ class $1
|
|||
$2
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet rest "JMS annotation" b
|
||||
/**
|
||||
* @JMS\Serializer\Annotation\SerializedName("$1")
|
||||
* @JMS\Serializer\Annotation\Groups({"$2"})
|
||||
* @JMS\Serializer\Annotation\VirtualProperty
|
||||
*/
|
||||
public function getRest${1/\w+\s*/\u$0/}()
|
||||
{
|
||||
return $this->get${1/\w+\s*/\u$0/}();
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet rest_class "JMS class annotation"
|
||||
* @JMS\Serializer\Annotation\ExclusionPolicy("all")
|
||||
endsnippet
|
||||
|
|
|
@ -8,6 +8,11 @@ endsnippet
|
|||
snippet schema "schema"
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="default" namespace="$1">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Engine" value="InnoDB" />
|
||||
<parameter name="Charset" value="utf8" />
|
||||
</vendor>
|
||||
|
||||
$2
|
||||
</database>
|
||||
endsnippet
|
||||
|
@ -15,19 +20,19 @@ endsnippet
|
|||
|
||||
snippet table "table"
|
||||
<table name="$1" isCrossRef="$2">
|
||||
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true"/>
|
||||
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true" />
|
||||
|
||||
<behavior name="timestampable"/>
|
||||
<behavior name="timestampable" />
|
||||
|
||||
<!--
|
||||
<foreign-key foreignTable="foo" onDelete="none" onUpdate="cascade">
|
||||
<reference local="foo_id" foreign="id"/>
|
||||
<reference local="foo_id" foreign="id" />
|
||||
</foreign-key>
|
||||
|
||||
<behavior name="sortable"/>
|
||||
<behavior name="sortable" />
|
||||
<behavior name="uploadable">
|
||||
<parameter name="fields" value="picture"/>
|
||||
<parameter name="paths" value="uploads/post/"/>
|
||||
<parameter name="fields" value="picture" />
|
||||
<parameter name="paths" value="uploads/post/" />
|
||||
</behavior>
|
||||
-->
|
||||
</table>
|
||||
|
@ -37,8 +42,12 @@ snippet id "id"
|
|||
<column name="id" type="INTEGER" primaryKey="true" required="true" autoIncrement="true" />
|
||||
endsnippet
|
||||
|
||||
snippet float "float"
|
||||
<column name="$1" type="FLOAT" required="false" />
|
||||
endsnippet
|
||||
|
||||
snippet int "int"
|
||||
<column name="$1" type="INTEGER" required="true" />
|
||||
<column name="$1" type="INTEGER" required="false" />
|
||||
endsnippet
|
||||
|
||||
snippet varchar "VARCHAR"
|
||||
|
@ -54,28 +63,28 @@ snippet longvarchar "LONGVARCHAR"
|
|||
endsnippet
|
||||
|
||||
snippet fk "fk"
|
||||
<column name="$1_id" type="integer" required="true" />
|
||||
<column name="$1_id" type="INTEGER" required="true" />
|
||||
|
||||
<foreign-key foreignTable="$1" name="fk_$1x" onDelete="cascade" onUpdate="cascade">
|
||||
<reference local="$1_id" foreign="id"/>
|
||||
<foreign-key foreignTable="$1" onDelete="cascade" onUpdate="cascade">
|
||||
<reference local="$1_id" foreign="id" />
|
||||
</foreign-key>
|
||||
<index name="fk_$1x_idx">
|
||||
<index>
|
||||
<index-column name="$1_id" />
|
||||
</index>
|
||||
endsnippet
|
||||
|
||||
snippet sort "sort"
|
||||
<behavior name="sortable"/>
|
||||
<behavior name="sortable" />
|
||||
endsnippet
|
||||
|
||||
snippet time "timestampable"
|
||||
<behavior name="timestampable"/>
|
||||
<behavior name="timestampable" />
|
||||
endsnippet
|
||||
|
||||
snippet upload "upload"
|
||||
<behavior name="uploadable">
|
||||
<parameter name="fields" value="$1"/>
|
||||
<parameter name="paths" value="uploads/$1/"/>
|
||||
<parameter name="fields" value="$1" />
|
||||
<parameter name="paths" value="uploads/$1/" />
|
||||
</behavior>
|
||||
endsnippet
|
||||
|
||||
|
@ -125,7 +134,7 @@ snippet phpunit
|
|||
processIsolation = "false"
|
||||
stopOnFailure = "false"
|
||||
syntaxCheck = "true"
|
||||
bootstrap = "vendor/autoload.php" >
|
||||
bootstrap = "vendor/autoload.php">
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="$1">
|
||||
|
|
Loading…
Reference in New Issue