|
@@ 239-245 (lines=7) @@
|
| 236 |
|
$simpleDirectives = [ |
| 237 |
|
'actionAddForIBlock' => 'addForIBlock', |
| 238 |
|
]; |
| 239 |
|
foreach ($simpleDirectives as $directive => $action) { |
| 240 |
|
$compiler->directive($directive, function ($expression) use ($action) { |
| 241 |
|
$expression = rtrim($expression, ')'); |
| 242 |
|
$expression = ltrim($expression, '('); |
| 243 |
|
return '<?php \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>'; |
| 244 |
|
}); |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
$echoDirectives = [ |
| 248 |
|
'actionEditIBlockElement' => 'editIBlockElement', |
|
@@ 260-266 (lines=7) @@
|
| 257 |
|
'actionDeleteHLBlockElement' => 'deleteHLBlockElement', |
| 258 |
|
'actionEditAndDeleteHLBlockElement' => 'editAndDeleteHLBlockElement', |
| 259 |
|
]; |
| 260 |
|
foreach ($echoDirectives as $directive => $action) { |
| 261 |
|
$compiler->directive($directive, function ($expression) use ($action) { |
| 262 |
|
$expression = rtrim($expression, ')'); |
| 263 |
|
$expression = ltrim($expression, '('); |
| 264 |
|
return '<?= \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>'; |
| 265 |
|
}); |
| 266 |
|
} |
| 267 |
|
} |
| 268 |
|
} |
| 269 |
|
|