function _social_path_manager_get_path_suffix in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 8.5 modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 8.7 modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 8.8 modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 10.3.x modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 10.0.x modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 10.1.x modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
- 10.2.x modules/custom/social_path_manager/social_path_manager.module \_social_path_manager_get_path_suffix()
Get the url suffix for a giving route of a group.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group being updated.
string $route: The route of the tab being updated.
Return value
string The url suffix of the tab.
1 call to _social_path_manager_get_path_suffix()
- _social_path_manager_update_alias in modules/
custom/ social_path_manager/ social_path_manager.module - Create the aliases for the views of the group.
File
- modules/
custom/ social_path_manager/ social_path_manager.module, line 192 - The Social Path Manager module.
Code
function _social_path_manager_get_path_suffix(GroupInterface $group, $route) {
$url = Url::fromRoute($route, [
'group' => $group
->id(),
]);
// Get the last part of the url.
$url = explode('/', $url
->getInternalPath());
return end($url);
}