AjaxResponse
class AjaxResponse extends JsonResponse implements AttachmentsInterface (View source)
JSON response object for AJAX requests.
Traits
Provides an implementation of AttachmentsInterface.
Properties
| protected array | $attachments | The attachments for this response. |
from AttachmentsTrait |
| protected array | $commands | The array of ajax commands. |
Methods
$this
array
getCommands()
Gets all AJAX commands.
Details
getAttachments()
{@inheritdoc}
addAttachments(array $attachments)
{@inheritdoc}
setAttachments(array $attachments)
{@inheritdoc}
$this
addCommand(CommandInterface $command, bool $prepend = FALSE)
Add an AJAX command to the response.
array
getCommands()
Gets all AJAX commands.