Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ParameterBag.php

function ParameterBag::getInt

Returns the parameter value converted to integer.

1 call to ParameterBag::getInt()
MediaLibraryState::getAvailableSlots in core/modules/media_library/src/MediaLibraryState.php
Returns the number of additional media items that can be selected.

File

vendor/symfony/http-foundation/ParameterBag.php, line 139

Class

ParameterBag
ParameterBag is a container for key/value pairs.

Namespace

Symfony\Component\HttpFoundation

Code

public function getInt(string $key, int $default = 0) : int {
    return $this->filter($key, $default, \FILTER_VALIDATE_INT, [
        'flags' => \FILTER_REQUIRE_SCALAR,
    ]);
}
RSS feed
Powered by Drupal