JsAttachmentsProcessor.php in JS Callback Handler 8.3
File
src/JsAttachmentsProcessor.php
View source
<?php
namespace Drupal\js;
use Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor;
use Drupal\Core\Render\AttachmentsInterface;
class JsAttachmentsProcessor extends AjaxResponseAttachmentsProcessor {
public function processAttachments(AttachmentsInterface $response) {
assert('$response instanceof \\Drupal\\js\\JsResponse');
$data = $response
->getData();
if (!isset($data['commands'])) {
$data['commands'] = [];
}
$data['commands'] = array_merge($data['commands'], $this
->buildAttachmentsCommands($response, $this->requestStack
->getCurrentRequest()));
$response
->setData($data);
return $response;
}
}