public function TaxonomyTermCoder::decode in Facets Pretty Paths 8
Decodes an alias back to an id.
Parameters
string $alias: An alias.
Return value
string An id.
Overrides CoderInterface::decode
File
- src/
Plugin/ facets_pretty_paths/ coder/ TaxonomyTermCoder.php, line 47
Class
- TaxonomyTermCoder
- Banana facets pretty paths coder.
Namespace
Drupal\facets_pretty_paths\Plugin\facets_pretty_paths\coderCode
public function decode($alias) {
$exploded = explode('-', $alias);
$id = array_pop($exploded);
return $id;
}