You are here

public function Result::__construct in Facets 8

Constructs a new result value object.

Parameters

\Drupal\facets\FacetInterface $facet: The facet related to the result.

mixed $raw_value: The raw value.

mixed $display_value: The formatted value.

int $count: The amount of items.

File

src/Result/Result.php, line 74

Class

Result
The default implementation of the result interfaces.

Namespace

Drupal\facets\Result

Code

public function __construct(FacetInterface $facet, $raw_value, $display_value, $count) {
  $this->facet = $facet;
  $this->rawValue = $raw_value;
  $this->displayValue = $display_value;
  $this->count = (int) $count;
}