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 #143
This commit is contained in:
parent
8997ae6c8e
commit
bcba6bd353
27 changed files with 593 additions and 224 deletions
tests/plugins/test
|
@ -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'];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue