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

Breadcrumb

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

function MediaLibraryState::getAvailableSlots

Returns the number of additional media items that can be selected.

When the value is not available in the URL the default is 0. When a negative integer is passed, an unlimited amount of media items can be selected.

Return value

int The number of additional media items that can be selected.

2 calls to MediaLibraryState::getAvailableSlots()
MediaLibraryState::getHash in core/modules/media_library/src/MediaLibraryState.php
Get the hash for the state object.
MediaLibraryState::hasSlotsAvailable in core/modules/media_library/src/MediaLibraryState.php
Determines if additional media items can be selected.

File

core/modules/media_library/src/MediaLibraryState.php, line 263

Class

MediaLibraryState
A value object for the media library state.

Namespace

Drupal\media_library

Code

public function getAvailableSlots() {
    return $this->getInt('media_library_remaining');
}
RSS feed
Powered by Drupal