You are here

public function HomeboxPageForm::closeBlock in Homebox 8

Ajax callback to hide block.

Parameters

string $token: Token of block.

Return value

\Drupal\Core\Ajax\AjaxResponse Response to hide buttons.

File

src/Form/HomeboxPageForm.php, line 164

Class

HomeboxPageForm
Class HomeboxPageForm.

Namespace

Drupal\homebox\Form

Code

public function closeBlock($token) {
  $response = new AjaxResponse();
  $response
    ->addCommand(new RemoveCommand('#' . $token));
  return $response;
}