function MediaLibraryState::hasSlotsAvailable

Same name in other branches
  1. 9 core/modules/media_library/src/MediaLibraryState.php \Drupal\media_library\MediaLibraryState::hasSlotsAvailable()
  2. 8.9.x core/modules/media_library/src/MediaLibraryState.php \Drupal\media_library\MediaLibraryState::hasSlotsAvailable()
  3. 11.x core/modules/media_library/src/MediaLibraryState.php \Drupal\media_library\MediaLibraryState::hasSlotsAvailable()

Determines if additional media items can be selected.

Return value

bool TRUE if additional items can be selected, otherwise FALSE.

File

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

Class

MediaLibraryState
A value object for the media library state.

Namespace

Drupal\media_library

Code

public function hasSlotsAvailable() {
    return $this->getAvailableSlots() !== 0;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.