You are here

function _check_path in Optimizely 8

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

Ensure that $path starts with a forward slash.

The alias_manager requires it.

3 calls to _check_path()
optimizely_page_attachments in ./optimizely.module
Implements hook_page_attachments().
_lookup_path_alias in ./optimizely.module
Helper function to lookup a path alias, given a path.
_lookup_system_path in ./optimizely.module
Helper function to lookup a system path, given a path alias.

File

./optimizely.module, line 287
Optimizely module.

Code

function _check_path($path) {
  return $path[0] == '/' ? $path : '/' . $path;
}