Search by

survos / connections-bundle

tacman1123

Renders a connections graph (survos/connections-contract) as an accessible SVG with a text list and source quotes.

Package info

github.com/survos/connections-bundle

Type:symfony-bundle

pkg:composer/survos/connections-bundle

Fund package maintenance!

kbond

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

2.45.67 2026-11-19 11:27 UTC

This package is auto-updated.

Last update: 2026-11-19 11:28:12 UTC


README

Draws a Survos\ConnectionsContract\ConnectionGraph as:

  • an SVG (focus first, direct connections in the next column, anything further after that), with a title and a description for screen readers, readable without JavaScript. Each node shows its kind (or schema), its name, and the years and roles when it has them;
  • the same connections as a list under a details element, each with its source quote and a source link;
  • a "More connections" link for each relation group that has more than was loaded.
{{ connections(graph) }}

Links

The graph holds no addresses. The application says where links go by implementing Survos\ConnectionsBundle\Link\ConnectionsLinker (nodeUrl, moreUrl, sourceUrl) and aliasing the interface to its service. Without one, nodes are drawn without links, and a source link is shown only when the edge carries a sourceUrl.

services:
    Survos\ConnectionsBundle\Link\ConnectionsLinker: '@App\Service\StoneConnectionsLinker'

Templates and styling

@SurvosConnections/graph.html.twig includes a small <style> block with connections-* classes and a dark-mode rule. Override the template in templates/bundles/SurvosConnections/ to restyle it.

Edges read from the node on the left to the node they point at. An edge with status reviewed is drawn heavier, and a same-as edge is dashed.

Tests

vendor/bin/phpunit -c bu/connections-bundle/phpunit.xml.dist