|
@@ 267-273 (lines=7) @@
|
| 264 |
|
$simpleDirectives = [ |
| 265 |
|
'actionAddForIBlock' => 'addForIBlock', |
| 266 |
|
]; |
| 267 |
|
foreach ($simpleDirectives as $directive => $action) { |
| 268 |
|
$compiler->directive($directive, function ($expression) use ($action) { |
| 269 |
|
$expression = rtrim($expression, ')'); |
| 270 |
|
$expression = ltrim($expression, '('); |
| 271 |
|
return '<?php \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>'; |
| 272 |
|
}); |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
$echoDirectives = [ |
| 276 |
|
'actionEditIBlockElement' => 'editIBlockElement', |
|
@@ 288-294 (lines=7) @@
|
| 285 |
|
'actionDeleteHLBlockElement' => 'deleteHLBlockElement', |
| 286 |
|
'actionEditAndDeleteHLBlockElement' => 'editAndDeleteHLBlockElement', |
| 287 |
|
]; |
| 288 |
|
foreach ($echoDirectives as $directive => $action) { |
| 289 |
|
$compiler->directive($directive, function ($expression) use ($action) { |
| 290 |
|
$expression = rtrim($expression, ')'); |
| 291 |
|
$expression = ltrim($expression, '('); |
| 292 |
|
return '<?= \Arrilot\BitrixHermitage\Action::' . $action . '($template, ' . $expression . '); ?>'; |
| 293 |
|
}); |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
|
| 297 |
|
/** |