Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added space before opening brace in PHP's foreach.snippet #14

Open
wants to merge 3 commits into from

1 participant

This page is out of date. Refresh to see the latest.
View
2  php/foreach.snippet
@@ -1,3 +1,3 @@
-foreach ($${1:variable} as $${2:key}){
+foreach ($${1:variable} as $${2:key}) {
${3:// code...}
}
View
1  php/hte.snippet
@@ -0,0 +1 @@
+htmlentities(${1}, ${2:ENT_QUOTES}, ${3:'UTF-8'})${4}
View
1  php/hts.snippet
@@ -0,0 +1 @@
+htmlspecialchars(${1}, ${2:ENT_QUOTES}, ${3:'UTF-8'})${4}
View
33 twig.snippets
@@ -0,0 +1,33 @@
+# Basic Twig snippets
+# Maintainer: F. Gabriel Gosselin <gabrielNOSPAM@evidens.ca>
+
+# if
+snippet if
+ {% if ${1} %}
+ ${2}
+ {% endif %}
+# for
+snippet for
+ {% for ${2:} in ${1} %}
+ ${3}{{ $2 }}
+ {% endfor %}
+# include
+snippet inc
+ {% include "${1}" %}
+# extend
+snippet ext
+ {% extends "${1}" %}
+# Print variable
+snippet }}
+ {{ ${1} }}${2}
+# Single Regular execution block
+snippet %%
+ {% ${1} %}${2}
+# Open/close block
+snippet %end
+ {% ${1:block} %}${2}{% end$1 %}
+# Named block
+snippet block
+ {% block ${1:name} %}${2}{% endblock %}
+snippet f_date
+ {{ ${1:a_date}|date("${2:m/d/Y}") }}
Something went wrong with that request. Please try again.