forked from chuyik/brackets-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
library-hints.yml
1132 lines (997 loc) · 26.7 KB
/
library-hints.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ---
# HTML
# From: https://github.com/joshnh/HTML-Snippets
# ---
- trigger: a
scope: html
description: Anchor Tag
text: |
<a href="${1}">${2}</a>${3}
- trigger: cond
scope: html
description: Conditional Comment
text: |
<!--[if ${1:lt IE 9}]>
<link rel=stylesheet href="${2:css/ie.css}">
<![endif]-->
- trigger: css
scope: html
description: Style Tag
text: |
<style type="text/css">${1}</style>${2}
- trigger: doctype
scope: html
description: Boilerplate HTML
text: |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>${1:Document}</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
${2}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>
- trigger: fig
scope: html
description: Figure Tag
text: |
<figure>
<img src="${1}" alt="${2}">
<figcaption>${3}</figcaption>
</figure>
- trigger: ga
scope: html
description: Google Analytics
text: |
<script>
var _gaq = [['_setAccount', '${1:UA-XXXXX-X}'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
}(document, 'script'));
</script>
- trigger: ga2
scope: html
description: New Google Analytics
text: |
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '${1:UA-XXXX-X}');
ga('send', 'pageview');
</script>
- trigger: img
scope: html
description: Dummy Image
text: |
<img src="http://dummyimage.com/${1:800}x${2:600}/4d494d/686a82.gif&text=${3:placeholder+image}" alt="${3:placeholder+image}">${4}
- trigger: link
scope: html
description: Link Tag
text: |
<link rel="stylesheet" type="text/css" href="${1}">${2}
- trigger: jquery
scope: html
description: jQuery Tag
text: |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
- trigger: lorem
scope: html
description: Dummy Text
text: |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
- trigger: meta
scope: html
description: Meta Tag
text: |
<meta charset=utf-8>
<meta name=description content="${1}">
<meta name=viewport content="width=device-width, initial-scale=1">${2}
- trigger: shiv
scope: html
description: IE Shiv
text: |
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
# ---
# CSS
# From: https://github.com/joshnh/CSS-Snippets
# ---
- trigger: ani
scope: css
description: Animation
text: |
-webkit-animation: ${1:name} ${2:duration};
animation: ${1:name} ${2:duration};${3}
- trigger: aft
scope: css
description: After
text: |
${1}:after {
content: '';
${2}
}
- trigger: box
scope: css
description: Box Shadow
text: |
box-shadow: ${1:horizontal}px ${2:vertical}px ${3:blur-radius}px ${4:spread-distance}px ${5:#eee};${6}
# From http://codepen.io/HugoGiraudel/pen/LklCv
- trigger: flex
scope: css
description: Flexbox
text: |
.flex-container {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.flex-item {
flex: 1;
background: tomato;
padding: 50px;
margin: 5px;
color: white;
text-align: center;
}
- trigger: ff
scope: css
description: Font Family
text: |
font-family: Helvetica, Arial, sans-serif;
- trigger: h
scope: css
description: HSLA
text: |
hsla(${1:0},${2:0}%,${3:0}%,${4:1})${5}
- trigger: key
scope: css
description: KeyFrames
text: |
@-webkit-keyframes ${1:name} {
0% {
${2:-webkit-transform: translate3d(0, 0, 0);}
}
100% {
${3:-webkit-transform: translate3d(0, 0, 0);}
}
}
@keyframes ${1:name} {
0% {
${2:transform: translate3d(0, 0, 0);}
}
100% {
${3:transform: translate3d(0, 0, 0);}
}
}
- trigger: med
scope: css
description: Media
text: |
@media (min-width: ${1}) {
${2}
}
- trigger: r
scope: css
description: RGBA
text: |
rgba(${1:0},${2:0},${3:0},${4:1})${5}
- trigger: tex
scope: css
description: Text Shadow
text: |
text-shadow: ${1:horizontal}px ${2:vertical}px ${3:blur-radius}px ${4:#eee};${5}
- trigger: cap
scope: css
description: Capitalize
text: |
text-transform: capitalize;
- trigger: upp
scope: css
description: Upper Case
text: |
text-transform: uppercase;
- trigger: wra
scope: css
description: Word Wrap
text: |
overflow-wrap: break-word;
word-wrap: break-word;
# ---
# Javascript: Console
# From: https://github.com/zenorocha/sublime-javascript-snippets
# ---
- trigger: cl
scope: javascript
description: console.log
tag: VanillaJS
tagHide: true
text: |
console.log(${1:obj});${2}
- trigger: cd
scope: javascript
description: console.dir
tag: VanillaJS
tagHide: true
text: |
console.dir(${1:obj});${2}
- trigger: ce
scope: javascript
description: console.error
tag: VanillaJS
tagHide: true
text: |
console.error(${1:obj});${2}
- trigger: cll
scope: javascript
description: console.log
tag: VanillaJS
tagHide: true
text: |
console.log('${1:obj}:', ${1:obj});${2}
- trigger: cdd
scope: javascript
description: console.dir
tag: VanillaJS
tagHide: true
text: |
console.dir('${1:obj}:', ${1:obj});${2}
- trigger: cee
scope: javascript
description: console.error
tag: VanillaJS
tagHide: true
text: |
console.error('${1:obj}:', ${1:obj});${2}
# ---
# Javascript: DOM
# ---
- trigger: ae
scope: javascript
description: document.addEventListener
tag: VanillaJS
tagHide: true
text: |
${1:document}.addEventListener('${2:event}', function(e) {
${3}
});
- trigger: ac
scope: javascript
description: document.appendChild
tag: VanillaJS
tagHide: true
text: |
${1:document}.appendChild(${2:elem});${3}
- trigger: rc
scope: javascript
description: document.removeChild
tag: VanillaJS
tagHide: true
text: |
${1:document}.removeChild(${2:elem});${3}
- trigger: cel
scope: javascript
description: document.createElement
tag: VanillaJS
tagHide: true
text: |
${1:document}.createElement(${2:elem});${3}
- trigger: gi
scope: javascript
description: document.getElementById
tag: VanillaJS
tagHide: true
text: |
${1:document}.getElementById('${2:id}');${3}
- trigger: gc
scope: javascript
description: document.getElementsByClassName
tag: VanillaJS
tagHide: true
text: |
${1:document}.getElementsByClassName('${2:class}');${3}
- trigger: gt
scope: javascript
description: document.getElementsByTagName
tag: VanillaJS
tagHide: true
text: |
${1:document}.getElementsByTagName('${2:tag}');${3}
- trigger: qs
scope: javascript
description: document.querySelector
tag: VanillaJS
tagHide: true
text: |
${1:document}.querySelector('${2:selector}');${3}
- trigger: qsa
scope: javascript
description: document.querySelectorAll
tag: VanillaJS
tagHide: true
text: |
${1:document}.querySelectorAll('${2:selector}');${3}
# ---
# Javascript: Loop
# ---
- trigger: fe
scope: javascript
description: forEach
tag: VanillaJS
tagHide: true
text: |
${1:myArray}.forEach(function (${2:elem}) {
${3}
});
- trigger: fi
scope: javascript
description: for in
tag: VanillaJS
tagHide: true
text: |
for (${1:prop} in ${2:obj}) {
if (${2:obj}.hasOwnProperty(${1:prop})) {
${3}
}
}
# ---
# Javascript: Function
# ---
- trigger: fn
scope: javascript
description: function
tag: VanillaJS
tagHide: true
text: |
function ${1:methodName} (${2:arguments}) {
${3}
}
- trigger: afn
scope: javascript
description: anonymous function
tag: VanillaJS
tagHide: true
text: |
function (${1:arguments}) {
${2}
}
- trigger: pr
scope: javascript
description: prototype
tag: VanillaJS
tagHide: true
text: |
${1:ClassName}.prototype.${2:methodName} = function (${3:arguments}) {
${4}
};
- trigger: sw
scope: javascript
description: switch statement
tag: VanillaJS
tagHide: true
text: |
switch(${1:expression}) {
case ${2:value}:
${3}
break;
default:
break;
}
# ---
# Javascript: Timer
# ---
- trigger: si
scope: javascript
description: setInterval
tag: VanillaJS
tagHide: true
text: |
setInterval(function() {
${2}
}, ${1:delay});
- trigger: st
scope: javascript
description: setTimeout
tag: VanillaJS
tagHide: true
text: |
setTimeout(function() {
${2}
}, ${1:delay});
# ---
# AngularJS
# From: myself
# ---
- trigger: config
scope: javascript
description: Config
tag: AngularJS
text: |
config(function (${1:$stateProvider}) {
${2}
})
- trigger: controller
scope: javascript
description: Controller
tag: AngularJS
text: |
controller('${1:name}', function (${2:$scope}) {
${3}
})
- trigger: directive
scope: javascript
description: Directive
tag: AngularJS
text: |
directive('${1:name}', function () {
return {
templateUrl: '${2:view/foo.html}',
restrict: '${3:A}',
scope: {
},
link: function postLink (${4:$scope, elem, attrs}) {
${5}
}
}
})
- trigger: factory
scope: javascript
description: Factory
tag: AngularJS
text: |
factory('${1:name}', function (${2}) {
${3}
return null;
})
- trigger: filter
scope: javascript
description: Filter
tag: AngularJS
text: |
filter(${1:name}, function(){
return function(input){
${2}
return input;
};
})
- trigger: provider
scope: javascript
description: Provider
tag: AngularJS
text: |
provider('${1:name}', function () {
${2}
this.$get = function () {
return null;
};
})
- trigger: run
scope: javascript
description: Run
tag: AngularJS
text: |
run(${1:$rootScope}, function () {
${2}
})
- trigger: service
scope: javascript
description: Service
tag: AngularJS
text: |
service('${1:name}', function (${2}) {
${3}
return null;
})
# ---
# php
# from: erknrio #5
# ---
- trigger: if
scope: php
description: if
text: |
if (${1:condition})
{
${2}
}
- trigger: ifelse
scope: php
description: if else
text: |
if (${1:condition})
{
${2}
}
else
{
${3}
}
- trigger: if?
scope: php
description: if ternary
text: |
$${1:var}= (${2:condition}) ? ${3:TRUE} : ${4:FALSE};
- trigger: ifalt
scope: php
description: if alternative
text: |
if (${1:condition})
${2}
endif;
- trigger: for
scope: php
description: for
text: |
for ($i = ${1:init}; $i < ${2:length}; $i++)
{
${3}
}
- trigger: fordec
scope: php
description: for decremental
text: |
for ($i = ${1:init}; $i > ${2:length}; $i--)
{
${3}
}
- trigger: foreach
scope: php
description: foreach value
text: |
foreach ($${1:var} as $${2:value})
{
${3}
}
- trigger: foreachkey
scope: php
description: foreach key value
text: |
foreach ($${1:var} as $${2:key} => $${3:value})
{
${4}
}
- trigger: foreachalt
scope: php
description: foreach value alternative
text: |
foreach ($${1:var} as $${2:value}):
${3}
endforeach;
- trigger: foreachkeyalt
scope: php
description: foreach alternative
text: |
foreach ($${1:var} as $${3:value}):
${4}
endforeach;
- trigger: foralt
scope: php
description: for alternative
text: |
for ($i = ${1:init}; $i < ${2:length}; $i++):
${3}
endfor;
- trigger: switch
scope: php
description: switch
text: |
switch ($${1:var})
{
case ${2:'value'}:
${3}
break;
default:
break;
}
- trigger: switchalt
scope: php
description: switch alternative
text: |
switch ($${1:var}):
case ${2:'value'}:
${3}
break;
default:
break;
endswitch;
- trigger: vardump
scope: php
description: var_dump
text: |
var_dump($${1:var});
- trigger: printr
scope: php
description: print_r
text: |
print_r($${1:var});
- trigger: fu
scope: php
description: function
text: |
${1:public} function ${2:FunctionName} ($${3:value} = ${4:''})
{
${5}
}
- trigger: echo
scope: php
description: echo string
text: |
echo '${1:string}';
- trigger: echovar
scope: php
description: echo variable
text: |
echo $${1:var};
- trigger: echostringvar
scope: php
description: echo string and variable
text: |
echo '${1:string}' . $${2:var};
- trigger: br
scope: php
description: echo html br
text: |
echo '</br>';
- trigger: empty
scope: php
description: empty
text: |
empty($${1:var});
- trigger: isset
scope: php
description: isset
text: |
isset($${1:var});
- trigger: array
scope: php
description: array
text: |
array(${1:value});
- trigger: arrayasoc
scope: php
description: array associative
text: |
array(${1:key} => ${2:value});
- trigger: jsonencode
scope: php
description: json encode
text: |
json_encode(${1:data});
- trigger: jsondecode
scope: php
description: json decode
text: |
json_decode(${1:data});
- trigger: $
scope: php
description: new variable
text: |
$${1:var} = ${2:value};
- trigger: =?
scope: php
description: short echo(>=5.4.0)
text: |
<?= ${1} ;?>
- trigger: date
scope: php
description: php date
text: |
date('${1}')
- trigger: dateo
scope: php
description: php DateTime
text: |
DateTime()
- trigger: urldecode
scope: php
description: url decode
text: |
urldecode(${1:str})
- trigger: urlencode
scope: php
description: url encode
text: |
urlencode(${1:str})
- trigger: array_sort
scope: php
description: url encode
text: |
asort(${1:array})
- trigger: array_sort_reverse
scope: php
description: url encode
text: |
arsort(${1:array})
# ---
# Php
# From: https://github.com/migliori/sublime-phpformbuilder
# ---
- trigger: setOptions;
scope: php
description: setOptions();
tag: PHP Form Builder
tagHide: true
text: |
$options = array(
'horizontalLabelCol' => 'col-sm-${1:4}',
'horizontalOffsetCol' => 'col-sm-offset-${1:4}',
'horizontalElementCol' => 'col-sm-${2:8}',
);
$form->setOptions($options);
- trigger: newForm;
scope: php
description: create new Form;
tag: PHP Form Builder
tagHide: true
text: |
use phpformsForm;
use phpformsValidatorValidator;
@session_start();
include_once rtrim($_SERVER['DOCUMENT_ROOT'], DIRECTORY_SEPARATOR) . '/${1:phpforms}/Form.php';
/* =============================================
validation if posted
============================================= */
if ($_SERVER["REQUEST_METHOD"] == "POST") {
include_once '${1:phpforms}/Validator/Validator.php';
include_once '${1:phpforms}/Validator/Exception.php';
$validator = new Validator($_POST);
$required = array('name', 'first-name');
foreach ($required as $required) {
$validator->required()->validate($required);
}
// check for errors
if ($validator->hasErrors()) {
$_SESSION['errors']['${2:my-form}'] = $validator->getAllErrors();
} else {
$from_email = '${3:[email protected]}';
$adress = '${3:[email protected]}';
$subject = '${4:Email Subject}';
$filter_values = '${2:my-form}, submit-btn';
$sent_message = Form::sendMail($from_email, $adress, $subject, $filter_values);
Form::clear('${2:my-form}');
}
}
$form = new Form('${2:my-form}');
$form->addInput('text', 'name', '', 'Name : ', 'required=required');
$form->addInput('text', 'first-name', '', 'First name : ', 'required=required');
$form->addBtn('button', 'cancel', 0, 'Cancel', 'class=btn btn-warning', 'btn-group');
$form->addBtn('submit', 'submit-btn', 1, 'Submit', 'class=btn btn-success', 'btn-group');
$form->printBtnGroup('btn-group');
- trigger: setAction
scope: php
description: setAction($url, $add_get_vars = true);
tag: PHP Form Builder
tagHide: true
text: |
$form->setAction(${1:htmlspecialchars($_SERVER["PHP_SELF"])}, ${2:$add_get_vars = true});
- trigger: addHtml
scope: php
description: addHtml($html, $element_name = '', $pos = 'after');
tag: PHP Form Builder
tagHide: true
text: |
$form->addHtml(${1:$html}, ${2:$element_name = ''}, ${3:$pos = 'after'});
- trigger: addInputWrapper
scope: php
description: addInputWrapper($html, $element_name);
tag: PHP Form Builder
tagHide: true
text: |
$form->addInputWrapper(${1:'<div class="wrapper"></div>'}, ${2:'element_name'});
- trigger: addInput;
scope: php
description: addInput($type, $name, $value = '', $label = '', $attr = '');
tag: PHP Form Builder
tagHide: true
text: |
$form->addInput(${1:$type}, ${2:$name}, ${3:$value = ''}, ${4:$label = ''}, ${5:$attr = ''});
- trigger: groupInputs
scope: php
description: groupInputs($input1, $input2, $input3 = '');
tag: PHP Form Builder
tagHide: true
text: |
$form->groupInputs('${1:field_1}', '${2:field_2}');
- trigger: addFileUpload
scope: php
description: addFileUpload($type, $name, $value = '', $label = '', $attr = '', $fileUpload_config = '');
tag: PHP Form Builder
tagHide: true
text: |
$fileUpload_config = array(
'xml' => ${1:'default'},
'uploader' => ${2:'defaultFileUpload.php'},
'btn-text' => ${3:'Browse ...'},
'max-number-of-files' => ${4:3}
);
$form->addHtml('<span class="help-block">3 files max. Accepted File Types : .pdf, .doc[x], .xls[x], .txt</span>', ${5:$name}, 'after');
$form->addFileUpload('file', ${5:$name}, ${6:$value = ''}, ${7:$label = ''}, ${8:$attr = ''}, $fileUpload_config);
- trigger: addTextarea
scope: php
description: addTextarea($name, $value = '', $label = '', $attr = '');
tag: PHP Form Builder
tagHide: true
text: |
$form->addTextarea(${1:$name}, ${2:$value = ''}, ${3:$label = ''}, ${4:$attr = ''});
- trigger: addOption
scope: php
description: addOption($select_name, $value, $txt, $group_name = '', $attr = '');
tag: PHP Form Builder
tagHide: true
text: |
$form->addOption(${1:$select_name}, ${2:$value}, ${3:$txt}, ${4:$group_name = ''}, ${5:$attr = ''});
- trigger: addSelect
scope: php
description: addSelect($select_name, $label = '', $attr = '', $displayGroupLabels = true);
tag: PHP Form Builder
tagHide: true
text: |
$form->addSelect(${1:$select_name}, ${2:$label}, ${3:$attr = ''}, ${4:$displayGroupLabels = true});
- trigger: addCountrySelect
scope: php
description: addCountrySelect($select_name, $label = '', $attr = '', $user_options = array());
tag: PHP Form Builder
tagHide: true
text: |
$form->addCountrySelect('${1:country}', '${2:Country : }');
- trigger: addRadio
scope: php
description: addRadio($group_name, $label, $value, $attr);
tag: PHP Form Builder
tagHide: true
text: |
$form->addRadio(${1:$group_name}, ${2:$label}, ${3:$value}, ${4:$attr = ''});
- trigger: printRadioGroup
scope: php
description: printRadioGroup($group_name, $label = '', $inline = true, $attr = '');
tag: PHP Form Builder
tagHide: true
text: |
$form->printRadioGroup(${1:$group_name}, ${2:$label}, ${3:$inline = true}, ${4:$attr = ''});
- trigger: addCheckbox
scope: php
description: addCheckbox($group_name, $label, $name, $value, $attr);
tag: PHP Form Builder
tagHide: true
text: |
$form->addCheckbox(${1:$group_name}, ${2:$label}, ${3:$name}, ${4:$value}, ${5:$attr});
- trigger: printCheckboxGroup