But imagine a case scenario where I am creating an entity for internal need only - this entity is never exposed to the end user - (no user will be able to edit / delete / view / comment / like on this entity). In such case what's the use of subscribing the user to this entity?
Good point.
I like your suggestion of a capability.
For now you can always listen to the 'create', 'relationship' hook. You can than check if it's a notification relationship with your entity and return false.
Thanks for considering the feature request, and the clue Jerome :)
Seems, you can only do it using custom CSS styles
I managed to achieve this by passing
Then I copied elgg/views/default/page/components/table.php to mod/myplugin/views/default/page/components/my-custom-list-type and added my conditions in that file.
In this case, your initial code should work as is.
Try use:
'item_class' => "elgg-item $class_name_based_on_metadata",
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.