3 use Shaarli\Bookmark\Bookmark
;
8 * @param array $data - data passed to plugin.
10 * @return mixed altered data.
12 function hook_test_random($data)
14 if (isset($data['_PAGE_']) && $data['_PAGE_'] == 'test') {
15 $data[1] = 'page test';
16 } elseif (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) {
17 $data[1] = 'loggedin';
18 } elseif (array_key_exists('_LOGGEDIN_', $data)) {
19 $data[1] = 'loggedin';
20 $data[2] = $data['_LOGGEDIN_'];
28 function hook_test_error()
33 function test_register_routes(): array
39 'callable' => 'getFunction',
44 'callable' => 'postFunction',
49 function hook_test_filter_search_entry(Bookmark
$bookmark, array $context): bool
51 return $context['_result'];