extended `getCategoryArrayForTwig()` with the parameter `$access`
completed search function