function _lookup_path_alias in Optimizely 8
Same name and namespace in other branches
- 8.3 optimizely.module \_lookup_path_alias()
- 8.0 optimizely.module \_lookup_path_alias()
Helper function to lookup a path alias, given a path.
This function acts as an adapter and passes back a return value like those of drupal_lookup_path(), which has been removed as of Drupal 8.
1 call to _lookup_path_alias()
- optimizely_page_attachments in ./
optimizely.module - Implements hook_page_attachments().
File
- ./
optimizely.module, line 261 - Optimizely module.
Code
function _lookup_path_alias($path) {
$path = _check_path($path);
$alias = \Drupal::service('path.alias_manager')
->getAliasByPath($path);
return strcmp($alias, $path) == 0 ? FALSE : $alias;
}