You are here

public function NodeTitleCoder::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/NodeTitleCoder.php, line 47

Class

NodeTitleCoder
Node title facets pretty paths coder.

Namespace

Drupal\facets_pretty_paths\Plugin\facets_pretty_paths\coder

Code

public function decode($alias) {
  $exploded = explode('-', $alias);
  $id = array_pop($exploded);
  return $id;
}