Related to #1151450: Define graphapi display mode we need to dispatch a callback to the appropriate engine.
Depends on #1812360: Views field rewrite are not taken into account.

Each engine has it's own 'more info' callback.

thejit_spacetree: the full path of IDs to the selected node like _root__views_ui
thejit_forcedirected: just the node ID like views_ui
graph_phyz: not yet implemented as it uses 'content' and uses jQuery UI when clicked on node.

For a demo see /admin/config/system/graphapi/demo

Comments

clemens.tolboom’s picture

When using the callback 'graphapi/info/$engine/$identifier/$engine_id' where

- $engine: thejit_spacetree, graph_phyz, thejit_forcedirected
- $identifier: kind of entity_type (node, taxonomy, module)
- $engine_id: the identifier given by the engine

Maybe we should experiment with ':' to merge $identifier with $engine_id to have just 1 identifiers.

On ie /admin/modules/graph we display modules. So how should that callback path looks like? That gives callbacks like

- graphapi/info/thejit_spacetree/module/_root__views_ui
- graphapi/info/thejit_spacetree/module/_root__views_ui__views

On each graph we only have 1 callback so to get info for a user or a node we need a compound key like

- graphapi/info/thejit_spacetree/user:1
- graphapi/info/thejit_spacetree/node:21

This also depends on #1812360: Views field rewrite are not taken into account. as we can then combine UID with string user or even just [entity_type]:[entity_id].

clemens.tolboom’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
clemens.tolboom’s picture

Issue summary: View changes

Added dependency

clemens.tolboom’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Issue summary: View changes

This is a won't fix for Drupal 7. Set to 8.x-1.x which has nice json integration.