public function AssetCollection::getLastModified

Returns the highest last-modified value of all assets in the current collection.

Return value

integer|null A UNIX timestamp

Overrides AssetInterface::getLastModified

1 call to AssetCollection::getLastModified()
GlobAsset::getLastModified in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Returns the highest last-modified value of all assets in the current collection.
1 method overrides AssetCollection::getLastModified()
GlobAsset::getLastModified in drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
Returns the highest last-modified value of all assets in the current collection.

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php, line 190

Class

AssetCollection
A collection of assets.

Namespace

Assetic\Asset

Code

public function getLastModified() {
  if (!count($this->assets)) {
    return;
  }
  $mtime = 0;
  foreach ($this as $asset) {
    $assetMtime = $asset
      ->getLastModified();
    if ($assetMtime > $mtime) {
      $mtime = $assetMtime;
    }
  }
  return $mtime;
}