You are here

public function AssetRefreshManager::setRequestLimit in Media: Acquia DAM 8

Set a new request limit.

Parameters

int $newLimit: The new request limit. Minimum of 1.

Return value

int The old limit that was set.

Overrides AssetRefreshManagerInterface::setRequestLimit

File

src/Service/AssetRefreshManager.php, line 258

Class

AssetRefreshManager
Class AssetRefreshManager.

Namespace

Drupal\media_acquiadam\Service

Code

public function setRequestLimit(int $newLimit = 250) : int {
  $old_limit = $this
    ->getRequestLimit();
  $this->requestLimit = max(1, $newLimit);
  return $old_limit;
}