public function CoreViewsFacetsFilterType::processDatabaseRow in Core Views Facets 8
Alters the result row before displaying the content.
Parameters
\stdClass $row: The row as returned by fetchObject().
\Drupal\views\Plugin\views\HandlerBase $handler: The loaded views contextual filter handler.
\Drupal\facets\FacetInterface $facet: The facet being executed.
Return value
\Drupal\facets\Result\Result A valid facet result entity.
Overrides CoreViewsFacetsFilterTypeInterface::processDatabaseRow
6 calls to CoreViewsFacetsFilterType::processDatabaseRow()
- Boolean::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Boolean.php - Alters the result row before displaying the content.
- Bundle::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Bundle.php - Alters the result row before displaying the content.
- Generic::processDatabaseRow in src/
Plugin/ facets/ processor/ contextual_filter_type/ Generic.php - Generic::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Generic.php - NodeType::processDatabaseRow in src/
Plugin/ facets/ processor/ contextual_filter_type/ NodeType.php - Alters the result row before displaying the content.
6 methods override CoreViewsFacetsFilterType::processDatabaseRow()
- Boolean::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Boolean.php - Alters the result row before displaying the content.
- Bundle::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Bundle.php - Alters the result row before displaying the content.
- Generic::processDatabaseRow in src/
Plugin/ facets/ processor/ contextual_filter_type/ Generic.php - Generic::processDatabaseRow in src/
Plugin/ facets/ processor/ exposed_filter_type/ Generic.php - NodeType::processDatabaseRow in src/
Plugin/ facets/ processor/ contextual_filter_type/ NodeType.php - Alters the result row before displaying the content.
File
- src/
CoreViewsFacetsFilterType.php, line 162
Class
- CoreViewsFacetsFilterType
- Base class for Core views facets filter type plugins.
Namespace
Drupal\core_views_facetsCode
public function processDatabaseRow(\stdClass $row, HandlerBase $handler, FacetInterface $facet) {
$value = $row->facetrawvalue;
$count = $row->facetcount;
if (!empty($row->facetlabel)) {
$label = $row->facetlabel;
}
else {
$label = $value;
}
return new Result($facet, $value, $label, $count);
}