Calling hook_entity_view from a theme
hook_entity_view() will only be invoked for modules so no chance of putting it in a theme unless you want to change how something works under the hood.

It's not a problem though, as all alter hooks are invoked for themes; so you can use hook_entity_view_alter() instead.


  This hook is called after the content has been assembled in a structured array and may be used for doing processing which requires that the complete entity content structure has been built.