protected function FacetApiPrettyPathsCoderDefault::prettyPath in Facet API Pretty Paths 7
Same name and namespace in other branches
- 6.3 plugins/coders/facetapi_pretty_paths_coder_default.inc \FacetApiPrettyPathsCoderDefault::prettyPath()
Convert a given text to a pretty path using pathauto, if available.
1 call to FacetApiPrettyPathsCoderDefault::prettyPath()
- FacetApiPrettyPathsCoderTaxonomy::encodePathSegment in plugins/
coders/ facetapi_pretty_paths_coder_taxonomy.inc - Taxonomy special case: <alias>/<term-name>-<term-id>
File
- plugins/
coders/ facetapi_pretty_paths_coder_default.inc, line 60 - A default coder for pretty paths.
Class
- FacetApiPrettyPathsCoderDefault
- Default FacetApiPrettyPathsCoder.
Code
protected function prettyPath($text) {
// @todo: Make this pluggable?
if (module_exists('pathauto')) {
// Needed, as of http://drupal.org/node/907578#comment-5564008
require_once drupal_get_path('module', 'pathauto') . '/pathauto.inc';
return pathauto_cleanstring($text);
}
return $text;
}