Skip to content

Commit 2e6a2f8

Browse files
committed
wip: Enable $block->getOtherSaveActions()
1 parent fb19fe0 commit 2e6a2f8

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

view/adminhtml/templates/form/actions.phtml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?php
22
declare(strict_types=1);
33

4-
/** @version 0.6.4 */
5-
64
use Loki\AdminComponents\Form\Field\Field;
75
use Loki\CssUtils\Util\CssClass;
86
use Magento\Framework\Escaper;
97
use Magento\Framework\View\Element\Template;
108
use Loki\AdminComponents\Component\Form\FormViewModel;
119
use Loki\Components\Util\Block\ChildRenderer;
1210

11+
/** @version 0.6.4 */
1312
/** @var Escaper $escaper */
1413
/** @var Template $block */
1514
/** @var Field $field */
@@ -20,7 +19,7 @@ use Loki\Components\Util\Block\ChildRenderer;
2019
$viewModel = $block->getViewModel();
2120
$buttons = $viewModel->getButtons();
2221
$mainSaveAction = false;
23-
$otherSaveActions = [];
22+
$otherSaveActions = (array)$block->getOtherSaveActions(); // @todo: Test whether this is working
2423
?>
2524
<div class="page-main-actions">
2625
<div class="page-actions-placeholder"></div>
@@ -62,9 +61,7 @@ $otherSaveActions = [];
6261
class="dropdown-menu"
6362
x-cloak x-show="showOtherActions"
6463
>
65-
<?php foreach (
66-
$otherSaveActions as $otherSaveAction
67-
): ?>
64+
<?php foreach ($otherSaveActions as $otherSaveAction): ?>
6865
<li>
6966
<span
7067
@click.prevent="saveAndDuplicateAction"

0 commit comments

Comments
 (0)