mod_admin_predicate

Add support for editing predicates in the admin, by presenting a list of all defined predicates on http://yoursite.com/admin/predicate.

Predicates can be added, removed and edited, just like regular resources.

ACL permissions

The following ACL permissions are required:

  • to view the page, the use permission on the ‘mod_admin_predicate’ module; see module#mod_acl_user_groups
  • to edit and delete predicates, edit and delete permissions on category ‘predicate’; see module#mod_acl_user_groups. Admin module for managing edge predicates and predicate resources in the backend.

Accepted Events

This module handles the following notifier callbacks:

  • observe_admin_menu: Add predicate management entries to the admin menu.
  • observe_rsc_delete: Do not allow a predicate to be removed iff there are edges with that predicate using m_predicate:is_used.
  • observe_rsc_update: Check if the update contains information for a predicate using m_predicate:update_noflush.
  • observe_rsc_update_done: Whenever a predicate has been updated we have to flush the predicate cache using m_predicate:flush.
  • observe_search_query: Implement predicate-specific search query clauses used by admin predicate listings.

Delegate callbacks:

  • event/2 with postback messages: delete_all.
  • event/2 with submit messages: delete_move.

Edit on GitHub

Observes

Notifications

observe_rsc_update_done/2

An updated resource has just been persisted. Observe this notification to execute follow-up actions for a resource update.

Notifications

observe_rsc_delete/2

Resource will be deleted. This notification is part of the delete transaction, it’s purpose is to clean up associated data.

Notifications

observe_rsc_update/3

An updated resource is about to be persisted. Observe this notification to change the resource properties before they are persisted.

Dispatch rules

Actions