Skip to content

Commit fa5573b

Browse files
committed
Small fix D7 snippets
1 parent 12a66ba commit fa5573b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

snippets/d7debug.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,50 @@
22
"D7Debug.write": {
33
"prefix": "d7debugWrite",
44
"body": [
5-
"Bitrix\\\\Main\\\\Diag\\\\Debug::writeToFile(array('${1:\\$varname}' => ${1:\\$varname}), \"\", \"${2:filename}.txt\");",
5+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::writeToFile(array('${1:\\$varname}' => ${1:\\$varname}), \"\", \"${2:filename}.txt\");",
66
"$0"
77
],
88
"description": "Печать переменных в файл. Использует print_r."
99
},
1010
"D7Debug.dump": {
1111
"prefix": "d7debugDump",
1212
"body": [
13-
"Bitrix\\\\Main\\\\Diag\\\\Debug::dumpToFile(array('${1:\\$varname}' => ${1:\\$varname}), \"\", \"${2:filename}.txt\");",
13+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::dumpToFile(array('${1:\\$varname}' => ${1:\\$varname}), \"\", \"${2:filename}.txt\");",
1414
"$0"
1515
],
1616
"description": "Печать переменных в файл. Использует var_dump."
1717
},
1818
"D7Debug.startTime": {
1919
"prefix": "d7debugStartTime",
2020
"body": [
21-
"Bitrix\\\\Main\\\\Diag\\\\Debug::startTimeLabel(\"${1:label}\");",
21+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::startTimeLabel(\"${1:label}\");",
2222
"$0"
2323
],
2424
"description": "Устанавливает метку начала отслеживания времени выполнения фрагмента кода."
2525
},
2626
"D7Debug.endTime": {
2727
"prefix": "d7debugEndTime",
2828
"body": [
29-
"Bitrix\\\\Main\\\\Diag\\\\Debug::endTimeLabel(\"${1:label}\");",
29+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::endTimeLabel(\"${1:label}\");",
3030
"$0"
3131
],
3232
"description": "Устанавливает метку окончания отслеживания времени выполнения фрагмента кода."
3333
},
3434
"D7Debug.getTime": {
3535
"prefix": "d7debugGetTime",
3636
"body": [
37-
"Bitrix\\\\Main\\\\Diag\\\\Debug::getTimeLabels();",
37+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::getTimeLabels();",
3838
"$0"
3939
],
4040
"description": "Вывод массива пользовательских меток выполнения фрагментов кода."
4141
},
4242
"D7Debug.time": {
4343
"prefix": "d7debugTime",
4444
"body": [
45-
"Bitrix\\\\Main\\\\Diag\\\\Debug::startTimeLabel(\"${1:label}\");",
45+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::startTimeLabel(\"${1:label}\");",
4646
"${TM_SELECTED_TEXT://yourcode}",
47-
"Bitrix\\\\Main\\\\Diag\\\\Debug::endTimeLabel(\"${1:label}\");",
48-
"Bitrix\\\\Main\\\\Diag\\\\Debug::getTimeLabels();",
47+
"\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::endTimeLabel(\"${1:label}\");",
48+
"if (\\$GLOBALS[\"USER\"]->IsAdmin()) {echo \"<pre>\";var_dump(\\\\Bitrix\\\\Main\\\\Diag\\\\Debug::getTimeLabels());echo \"</pre>\";}",
4949
"$0"
5050
],
5151
"description": "Замер времени выполнения выделенного фрагмента кода."

snippets/d7loader.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"D7Loader": {
33
"prefix": "d7loader",
44
"body": [
5-
"\\\\Bitrix\\\\Main\\\\Loader::includeModule(\"${1:module}\");"
5+
"\\\\Bitrix\\\\Main\\\\Loader::includeModule(\"${1|abtest,bitrixcloud,blog,catalog,clouds,conversion,currency,fileman,form,forum,highloadblock,iblock,landing,main,messageservice,mobileapp,perfmon,photogallery,pull,report,rest,sale,search,security,sender,seo,socialservices,subscribe,translate,ui,vote|}\");"
66
],
77
"description": "Метод подключает модуль по его имени."
88
}

0 commit comments

Comments
 (0)