3 namespace Drupal\Core\Ajax;
6 * AJAX command for updating the value of a hidden form_build_id input element
7 * on a form. It requires the form passed in to have keys for both the old build
8 * ID in #build_id_old and the new build ID in #build_id.
10 * The primary use case for this Ajax command is to serve a new build ID to a
11 * form served from the cache to an anonymous user, preventing one anonymous
12 * user from accessing the form state of another anonymous user on Ajax enabled
15 * This command is implemented by
16 * Drupal.AjaxCommands.prototype.update_build_id() defined in misc/ajax.js.
20 class UpdateBuildIdCommand implements CommandInterface {
37 * Constructs a UpdateBuildIdCommand object.
44 public function __construct($old, $new) {
52 public function render() {
54 'command' => 'update_build_id',