New plugin hook: ability to add custom filters to Shaarli search engine

A new plugin hook has been added: hook_test_filter_search_entry
This hook allows to filter out bookmark with custom plugin code when a search is performed.

Related to 
This commit is contained in:
ArthurHoaro 2021-01-20 15:59:00 +01:00
parent 8997ae6c8e
commit bcba6bd353
27 changed files with 593 additions and 224 deletions
tests/plugins/test

View file

@ -1,5 +1,7 @@
<?php
use Shaarli\Bookmark\Bookmark;
/**
* Hook for test.
*
@ -43,3 +45,8 @@ function test_register_routes(): array
],
];
}
function hook_test_filter_search_entry(Bookmark $bookmark, array $context): bool
{
return $context['_result'];
}