You are here

function _lookup_path_alias in Optimizely 8.0

Same name and namespace in other branches
  1. 8.3 optimizely.module \_lookup_path_alias()
  2. 8 optimizely.module \_lookup_path_alias()

These three functions are redundant with trait LookupPath, but I haven't been able to re-use the trait in this .module file.

1 call to _lookup_path_alias()
optimizely_page_attachments in ./optimizely.module
Implements hook_page_build().

File

./optimizely.module, line 234
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;
}