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

Commit

Permalink
Merge pull request #744 from mbartok/master
Browse files Browse the repository at this point in the history
Fix for Multiselect Column on Symfony 4
  • Loading branch information
Seb33300 authored Mar 2, 2018
2 parents 06bdf59 + 8f93631 commit 361bc60
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Datatable/Column/MultiselectColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,29 @@ public function setActions(array $actions)
{
if (count($actions) > 0) {
foreach ($actions as $action) {
$newAction = new MultiselectAction($this->datatableName);
$this->actions[] = $newAction->set($action);
$this->addAction($action);
}
} else {
throw new Exception('MultiselectColumn::setActions(): The actions array should contain at least one element.');
}

return $this;
}

/**
* Add action.
*
* @param array $action
*
* @return $this
*/
public function addAction(array $action)
{
$newAction = new MultiselectAction($this->datatableName);
$this->actions[] = $newAction->set($action);

return $this;
}

/**
* Get attributes.
Expand Down
12 changes: 12 additions & 0 deletions Resources/translations/messages.sk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sg:
datatables:
confirmMessage: "Ste si istý?"
selectError: "Musíte vybrať aspoň jeden prvok."
actions:
title: "Akcie"
show: "Zobraziť"
edit: "Upraviť"
daterange:
apply: "Aplikovať"
cancel: "Zrušiť"
format: "DD.MM.YYYY"

0 comments on commit 361bc60

Please sign in to comment.