Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Delete short open tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Ge1i0N authored and arrilot committed Oct 13, 2020
1 parent 064b8a6 commit c677864
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $compiler->directive('directiveName', function ($expression) {
1. ```@bxComponent``` (старый вариант - `@component`) - аналог ```$APPLICATION->IncludeComponent()```
2. ```@block('key')``` и ```@endblock``` - всё что заключено между ними будет выведено в месте, где вызван метод ```$APPLICATION->ShowViewContent('key')```
3. ```@lang('key')``` - равносильно ```{!! Bitrix\Main\Localization\Loc::getMessage('key') !!} ```
4. ```@auth``` и ```@endauth``` - сокращенная запись `<? if($USER->IsAuthorized()) ?> ... <? endif ?>`
4. ```@auth``` и ```@endauth``` - сокращенная запись `<?php if($USER->IsAuthorized()) ?> ... <?php endif ?>`
5. ```@guest``` и ```@endguest``` - аналогично, но проверка на неавторизованного юзера.
6. ```@admin``` и ```@endadmin``` - аналогично, но `$USER->IsAdmin()`
7. ```@csrf``` - сокращенная форма для ```<input type="hidden" name="sessid" value="{!! bitrix_sessid() !!}" />```
Expand Down
4 changes: 2 additions & 2 deletions src/BladeCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class BladeCompiler extends BaseCompiler
*/
public function compileString($value)
{
$result = '<?if(!defined("B_PROLOG_INCLUDED")||B_PROLOG_INCLUDED!==true) die();?>';
$result .= '<?if(!empty($arResult)) extract($arResult, EXTR_SKIP);?>';
$result = '<?php if(!defined("B_PROLOG_INCLUDED")||B_PROLOG_INCLUDED!==true) die();?>';
$result .= '<?php if(!empty($arResult)) extract($arResult, EXTR_SKIP);?>';

return $result . parent::compileString($value);
}
Expand Down

0 comments on commit c677864

Please sign in to comment.