Skip to content

Commit 1905239

Browse files
authored
Merge pull request #18 from webfactor/1.3
add position
2 parents 1dc69e7 + ba68978 commit 1905239

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Traits/CreatesListButton.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ public function addInstantCreateButtonToList(
88
string $foreignAjaxEntity,
99
string $content,
1010
string $entity = 'entity_id',
11-
string $class = 'btn btn-xs btn-default'
11+
string $class = 'btn btn-xs btn-default',
12+
string $position = 'beginning'
1213
) {
1314
if (!isset($this->crud->instantCreateButtons)) {
1415
$this->crud->instantCreateButtons = [];
@@ -21,7 +22,7 @@ public function addInstantCreateButtonToList(
2122
'content' => $content,
2223
];
2324

24-
$this->crud->addButton('line', $foreignAjaxEntity, 'view', 'webfactor::buttons.create');
25+
$this->crud->addButton('line', $foreignAjaxEntity, 'view', 'webfactor::buttons.create', $position);
2526
$this->crud->addButton('bottom', $foreignAjaxEntity, 'view', 'webfactor::buttons.fake');
2627
}
2728
}

0 commit comments

Comments
 (0)