CommandWithAttachedAssetsInterface.php 517 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace Drupal\Core\Ajax;
  3. /**
  4. * Interface for Ajax commands that render content and attach assets.
  5. *
  6. * All Ajax commands that render HTML should implement these methods
  7. * to be able to return attached assets to the calling AjaxResponse object.
  8. *
  9. * @ingroup ajax
  10. */
  11. interface CommandWithAttachedAssetsInterface {
  12. /**
  13. * Gets the attached assets.
  14. *
  15. * @return \Drupal\Core\Asset\AttachedAssets|null
  16. * The attached assets for this command.
  17. */
  18. public function getAttachedAssets();
  19. }