function hook_facets_block_facets_alter in Facets Block 8
Alter the facets array.
Parameters
array $facets: The facets array.
1 invocation of hook_facets_block_facets_alter()
- FacetsBlock::build in src/
Plugin/ Block/ FacetsBlock.php - Builds and returns the renderable array for this block plugin.
File
- ./
facets_block.api.php, line 22 - Describes hooks and plugins provided by the Facets Block module.
Code
function hook_facets_block_facets_alter(array &$facets) {
$facets[] = [
'title' => '',
'content' => Link::fromTextAndUrl(t('Home page'), Url::fromRoute('<front>', [], [
'query' => [
'filter' => 'recent-posts',
],
])),
];
}