Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 361bc60

Browse files
authored
Merge pull request #744 from mbartok/master
Fix for Multiselect Column on Symfony 4
2 parents 06bdf59 + 8f93631 commit 361bc60

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

Datatable/Column/MultiselectColumn.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,29 @@ public function setActions(array $actions)
191191
{
192192
if (count($actions) > 0) {
193193
foreach ($actions as $action) {
194-
$newAction = new MultiselectAction($this->datatableName);
195-
$this->actions[] = $newAction->set($action);
194+
$this->addAction($action);
196195
}
197196
} else {
198197
throw new Exception('MultiselectColumn::setActions(): The actions array should contain at least one element.');
199198
}
200199

201200
return $this;
202201
}
202+
203+
/**
204+
* Add action.
205+
*
206+
* @param array $action
207+
*
208+
* @return $this
209+
*/
210+
public function addAction(array $action)
211+
{
212+
$newAction = new MultiselectAction($this->datatableName);
213+
$this->actions[] = $newAction->set($action);
214+
215+
return $this;
216+
}
203217

204218
/**
205219
* Get attributes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sg:
2+
datatables:
3+
confirmMessage: "Ste si istý?"
4+
selectError: "Musíte vybrať aspoň jeden prvok."
5+
actions:
6+
title: "Akcie"
7+
show: "Zobraziť"
8+
edit: "Upraviť"
9+
daterange:
10+
apply: "Aplikovať"
11+
cancel: "Zrušiť"
12+
format: "DD.MM.YYYY"

0 commit comments

Comments
 (0)