public function Asset::isIndex in Mini site 8
Check if the current asset is index entry point.
Return value
bool TRUE if the asset is index entry point, FALSE otherwise.
Overrides AssetInterface::isIndex
File
- src/
Asset.php, line 455
Class
- Asset
- Class Asset.
Namespace
Drupal\minisiteCode
public function isIndex() {
if (!UrlValidator::urlIsIndex($this->urlBag
->getUri(), self::INDEX_FILE)) {
return FALSE;
}
$path = $this->urlBag
->getPathInArchive();
$in_root = strpos($path, DIRECTORY_SEPARATOR) == FALSE;
return $in_root;
}