You are here

protected function FormAjaxSubscriber::formatSize in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber::formatSize()
  2. 9 core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber::formatSize()

Wraps format_size()

Return value

string The formatted size.

1 call to FormAjaxSubscriber::formatSize()
FormAjaxSubscriber::onException in core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php
Catches a form AJAX exception and build a response from it.

File

core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php, line 152

Class

FormAjaxSubscriber
Wraps AJAX form submissions that are triggered via an exception.

Namespace

Drupal\Core\Form\EventSubscriber

Code

protected function formatSize($size) {
  return format_size($size);
}