You are here

public function AssetContainer::getIndexAsset in Mini site 8

Get index asset.

Return value

\Drupal\minisite\Asset|null Instance of the index asset or NULL if no index asset is found.

1 call to AssetContainer::getIndexAsset()
AssetContainer::getIndexAssetUri in src/AssetContainer.php
Get a URI of the index asset.

File

src/AssetContainer.php, line 79

Class

AssetContainer
Class Asset.

Namespace

Drupal\minisite

Code

public function getIndexAsset() {
  foreach ($this->assets as $asset) {
    if ($asset
      ->isIndex()) {
      return $asset;
    }
  }
  return NULL;
}