You are here

public function Facet::getFieldAlias in Facets 8

Returns the field alias used to identify the facet in the url.

Return value

string The field alias for the facet.

Overrides FacetInterface::getFieldAlias

File

src/Entity/Facet.php, line 632

Class

Facet
Defines the facet configuration entity.

Namespace

Drupal\facets\Entity

Code

public function getFieldAlias() {

  // For now, create the field alias based on the field identifier.
  $field_alias = preg_replace('/[:\\/]+/', '_', $this->field_identifier);
  return $field_alias;
}