private function SocialEventInviteConfigOverride::getPathByAlias in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_event/modules/social_event_invite/src/SocialEventInviteConfigOverride.php \Drupal\social_event_invite\SocialEventInviteConfigOverride::getPathByAlias()
- 10.1.x modules/social_features/social_event/modules/social_event_invite/src/SocialEventInviteConfigOverride.php \Drupal\social_event_invite\SocialEventInviteConfigOverride::getPathByAlias()
Given the alias, return the path it represents.
Parameters
string $alias: An alias.
Return value
string The path represented by alias, or the alias if no path was found.
1 call to SocialEventInviteConfigOverride::getPathByAlias()
- SocialEventInviteConfigOverride::validateInviteData in modules/
social_features/ social_event/ modules/ social_event_invite/ src/ SocialEventInviteConfigOverride.php - Validate invite data.
File
- modules/
social_features/ social_event/ modules/ social_event_invite/ src/ SocialEventInviteConfigOverride.php, line 175
Class
- SocialEventInviteConfigOverride
- Provides an overridden elements.
Namespace
Drupal\social_event_inviteCode
private function getPathByAlias($alias) {
$query = $this->database
->select('path_alias', 'base_table');
$query
->condition('base_table.status', '1');
$query
->fields('base_table', [
'path',
]);
$query
->condition('base_table.alias', $this->database
->escapeLike($alias), 'LIKE');
if ($path = $query
->execute()
->fetchField()) {
return $path;
}
return $alias;
}