public function MediaLibraryState::getAvailableSlots in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media_library/src/MediaLibraryState.php \Drupal\media_library\MediaLibraryState::getAvailableSlots()
- 9 core/modules/media_library/src/MediaLibraryState.php \Drupal\media_library\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.
File
- core/
modules/ media_library/ src/ MediaLibraryState.php, line 260
Class
- MediaLibraryState
- A value object for the media library state.
Namespace
Drupal\media_libraryCode
public function getAvailableSlots() {
return $this
->getInt('media_library_remaining');
}