Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- шаблоны лежат в %HOMEPATH%\.<product><version>\config\templates
- ## PHP
- <template name="bx_doc_component" value="/** * @var array $arParams * @var array $arResult * @global CMain $APPLICATION * @global CUser $USER * @global CDatabase $DB * @var CBitrixComponent $this * @var string $componentPath * @var string $componentName * @var string $componentTemplate * @var string $parentComponentPath * @var string $parentComponentName * @var string $parentComponentTemplate * @var CBitrixComponent $component */ " description="bitrix component.php phpdoc" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="bx_doc_component_epilog" value="/** * @var array $arParams * @var array $arResult * @global CMain $APPLICATION * @global CUser $USER * @global CDatabase $DB * @var CBitrixComponent $this * @var string $componentPath * @var string $templateName * @var string $templateFile * @var string $templateFolder * @var string $templateData * @var CBitrixComponent $component */ " description="bitrix component_epilog.php phpdoc" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="bx_doc_result_modifier" value="/** * @var array $arParams * @var array $arResult * @global CMain $APPLICATION * @global CUser $USER * @global CDatabase $DB * @var CBitrixComponentTemplate $this */ " description="bitrix result_modifier.php phpdoc" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="bx_doc_template" value="/** * @var array $arParams * @var array $arResult * @global CMain $APPLICATION * @global CUser $USER * @global CDatabase $DB * @var CBitrixComponentTemplate $this * @var string $componentPath * @var string $templateName * @var string $templateFile * @var string $templateFolder * @var string $templateData */ " description="bitrix template.php phpdoc" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="bx_prolog_ifdef" value="if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die();" description="insert bitrix ifdef prolog" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="pre" value="echo'<pre class="php_pre" style="display:block;">',print_r($END$, true),'</pre>';//TODO:delete" description="php pre to html" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- <template name="fpre" value="file_put_contents($_SERVER['DOCUMENT_ROOT'].'/$FILE$.txt', date("d.m.Y H:i:s\n").print_r($END$, true)."\n".str_repeat('-', 20)."\n", FILE_APPEND | LOCK_EX);//TODO:delete" description="pre to file" toReformat="false" toShortenFQNames="true">
- <variable name="FILE" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="PHP Statement" value="true" />
- </context>
- </template>
- ## HTML
- <template name="ec" value="<?= $END$ ?>" description="short echo" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="HTML" value="true" />
- </context>
- </template>
- <template name="fore" value="<? foreach ($ARRAY$ as $ITEM$): ?> $END$ <? endforeach; ?>" description="surround with <?foreach?><?endforeach?>" toReformat="true" toShortenFQNames="true">
- <variable name="ARRAY" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="ITEM" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="forek" value="<? foreach ($ARRAY$ as $KEY$ => $VALUE$): ?> $END$ <? endforeach; ?>" description="surround with <?foreach?><?endforeach?> with k=>v" toReformat="true" toShortenFQNames="true">
- <variable name="ARRAY" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="KEY" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="VALUE" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="if" value="<? if ($CONDITION$): ?> $YES$ <? else: ?> $END$ <? endif; ?>" description="print <?if?><?else?><?endif?> block" toReformat="true" toShortenFQNames="true">
- <variable name="CONDITION" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="YES" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="ifi" value="<?= ($CONDITION$) ? $YES$ : $END$ ?>" description="inline condotional echo" toReformat="true" toShortenFQNames="true">
- <variable name="CONDITION" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="YES" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML" value="true" />
- </context>
- </template>
- <template name="loc" value="<?= Loc::getMessage("$END$") ?>" description="bitrix Loc::getMessage" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="HTML" value="true" />
- </context>
- </template>
- <template name="pre" value="<pre class="php_pre" style="display:block;"><?print_r($END$);?></pre><!-- //TODO:delete -->" description="php pre" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="HTML" value="true" />
- </context>
- </template>
- <template name="surround_fore" value="<? foreach ($ARRAY$ as $END$): ?> $SELECTION$ <? endforeach; ?>" description="surround with <?foreach?><?endforeach?>" toReformat="true" toShortenFQNames="true">
- <variable name="ARRAY" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="surround_forek" value="<? foreach ($ARRAY$ as $KEY$ => $END$): ?> $SELECTION$ <? endforeach; ?>" description="surround with <?foreach?><?endforeach?> with k=>v" toReformat="true" toShortenFQNames="true">
- <variable name="ARRAY" expression="" defaultValue="" alwaysStopAt="true" />
- <variable name="KEY" expression="" defaultValue="" alwaysStopAt="true" />
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="surround_if" value="<? if ($END$): ?> $SELECTION$ <? endif; ?>" description="surround with <?if?><?endif?>" toReformat="true" toShortenFQNames="true">
- <context>
- <option name="HTML_TEXT" value="true" />
- </context>
- </template>
- <template name="surround_ifi" value="<?= ($END$) ? "$SELECTION$" : ''; ?>" description="surround with optional echo in tags" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="HTML" value="true" />
- <option name="HTML_TEXT" value="false" />
- </context>
- </template>
- <template name="surround_ifl" value="<? if ($END$): ?>$SELECTION$<? endif; ?>" description="surround with <?if?><?endif?> in tags" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="HTML" value="true" />
- <option name="HTML_TEXT" value="false" />
- </context>
- </template>
- ## JS
- <template name="pre" value="console.log($END$);" description="log to console" toReformat="false" toShortenFQNames="true">
- <context>
- <option name="JS_STATEMENT" value="true" />
- </context>
- </template>
Add Comment
Please, Sign In to add comment