public function EasyBreadcrumbBuilder::applyTitleReplacement in Easy Breadcrumb 8
Same name and namespace in other branches
- 2.x src/EasyBreadcrumbBuilder.php \Drupal\easy_breadcrumb\EasyBreadcrumbBuilder::applyTitleReplacement()
Apply title replacements.
Parameters
string $title: Page title.
array $replacements: Replacement rules map.
2 calls to EasyBreadcrumbBuilder::applyTitleReplacement()
- EasyBreadcrumbBuilder::build in src/
EasyBreadcrumbBuilder.php - Builds the breadcrumb.
- EasyBreadcrumbBuilder::getTitleString in src/
EasyBreadcrumbBuilder.php - Get string title for route.
File
- src/
EasyBreadcrumbBuilder.php, line 661
Class
- EasyBreadcrumbBuilder
- Primary implementation for the Easy Breadcrumb builder.
Namespace
Drupal\easy_breadcrumbCode
public function applyTitleReplacement(&$title, array $replacements) {
if (!is_string($title)) {
return;
}
if (array_key_exists($title, $replacements)) {
$title = $replacements[$title];
}
}