diff --git a/library/Director/Web/Table/Extension/MultiSelect.php b/library/Director/Web/Table/Extension/MultiSelect.php new file mode 100644 index 00000000..03f5c007 --- /dev/null +++ b/library/Director/Web/Table/Extension/MultiSelect.php @@ -0,0 +1,27 @@ +addAttributes([ + 'class' => 'multiselect' + ]); + + $prefix = 'data-icinga-multiselect'; + $multi = [ + "$prefix-url" => Url::fromPath($url), + "$prefix-controllers" => Url::fromPath($sourceUrl), + "$prefix-data" => implode(',', $keys), + ]; + + $this->addAttributes($multi); + + return $this; + } +}