function EntityTypeInfo::getPathParts
Same name in other branches
- 4.x src/EntityTypeInfo.php \Drupal\devel\EntityTypeInfo::getPathParts()
Get path parts.
Parameters
string $entity_path: Entity path.
Return value
string Path parts.
1 call to EntityTypeInfo::getPathParts()
- EntityTypeInfo::setEntityTypeLinkTemplate in src/
EntityTypeInfo.php - Sets entity type link template.
File
-
src/
EntityTypeInfo.php, line 116
Class
- EntityTypeInfo
- Manipulates entity type information.
Namespace
Drupal\develCode
protected function getPathParts($entity_path) : string {
$path = '';
if (preg_match_all('/{\\w*}/', $entity_path, $matches)) {
foreach ($matches[0] as $match) {
$path .= '/' . $match;
}
}
return $path;
}