Refactor controller:
Refactor controller:

- Change to extend BackendBase giving events, and helpers
- Define static permission string as a constant
- Use Bolt's ACL before method
- Don't deep-nest logic & use nulls — it is faster — avoid else statements!
- Don't perform needless round-trips to the container
- PHPDoc for the win

xiaohutai/bolt-tntsearch,xiaohutai/bolt-tntsearch