Problem/Motivation

The module has lots of functions for adding to graphs and changing a graph. These were useful on D7 when the graph was an array with a custom structure, as these functions ensured the array was well-constructed.

Now that we're using graphp/graph, I don't think we need any of these: the Graph object has a well-defined API, and code that assembles or manipulates a graph should use that.

If we wanted to standardize certain attributes, such as 'title' or 'content', then the best thing for that would be to define a wrapper class rather than procedural functions.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

joachim created an issue. See original summary.

clemens.tolboom’s picture

Excellent idea.

IIRC graphp/graph has custom attributes.

joachim’s picture

> IIRC graphp/graph has custom attributes.

Yup, you can do $vertex->setAttribute('key-I-made-up', 'some value').

What I mean is that in Graph API we should declare a standard, e.g. the 'title' attribute will be passed to engines to display the the label of a vertex or edge. But that's for another issue.

  • joachim committed 456b302 on 2.0.x
    Issue #3265085: Removed procedural functions for manipulating graphs.
joachim’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.