/**
* JavaScript behavior to allow shift select in grids
*
* @param string $id The id of the form for which a multiselect behaviour is to be applied.
*
* @return void
*
* @since 1.7
* @deprecated 5.0 Use the script directly
*/
public static function multiselect($id = 'adminForm')
{
// Only load once
if (isset(static::$loaded[__METHOD__][$id])) {
return;
}
Factory::getDocument()->getWebAssetManager()->useScript('multiselect');
// Pass the required options to the javascript
Factory::getDocument()->addScriptOptions('js-multiselect', ['formName' => $id]);
// Set static array
static::$loaded[__METHOD__][$id] = true;
}