2017 © Pedro Peláez
 

silverstripe-module silvergraph

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

image

froog/silvergraph

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  • Monday, February 13, 2017
  • by froog
  • Repository
  • 4 Watchers
  • 38 Stars
  • 4,920 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 6 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

SilverGraph

Creates data model visualisations of SilverStripe DataObjects, showing fields, relations and ancestry. Can output images in .png, .svg and raw GraphViz "dot" format. Flexible configuration options and can be called from command line and URL., (*1)

SilverGraph example, (*2)

Example call: http://example.com/Silvergraph/png?location=cms,framework,mysite, (*3)

Installation

  • Composer/Packagist: Install composer, run composer require froog/silvergraph (* for version) and visit ?flush=1 to update the routing table.
  • Manual: Download and extract silvergraph as SilverGraph folder in the top level of your site and visit ?flush=1 to update the routing table.

Installation on OSX

  • Install Graphviz via Homebrew: brew install graphviz and note down the location
  • Add the location to your _ss_environment.php file, postpending 'dot' to the end of the path, e.g.: define('SILVERGRAPH_GRAPHVIZ_PATH', '/usr/local/Cellar/graphviz/2.38.0/bin/dot');
  • Visit ?flush=1 to update the routing table.

Requirements

  • SilverStripe 3.0.0+
  • To create images: GraphViz (latest version) http://www.graphviz.org/
    • To install (Debian/Ubuntu): apt-get install graphviz

Usage

Command line: (in site root)

  • Default png image: sake Silvergraph/png > datamodel.png
  • Parameters: sake Silvergraph/png location=mysite,cms inherited=1 exclude=SiteTree > datamodel.png
  • Default dot file: sake Silvergraph/dot > datamodel.dot

Browser: (logged in as admin)

  • Default png image: http://example.com/Silvergraph/png
  • Parameters: http://example.com/Silvergraph/png?location=mysite,cms&inherited=1&exclude=SiteTree
  • Default dot file: http://example.com/Silvergraph/dot

Parameters

Specify the folder to look for classes under

  • location=mysite (default) Only graph classes under the /mysite folder
  • location=/ Graph ALL classes in every module (warning - may take a long time and could generate a large .png)
  • location=mysite,mymodule Only graph classes under /mysite and /mymodule folders

Remove specific classes from the graph

  • exclude=SiteTree
  • exclude=SiteTree,File

How verbosely to show relations

  • relations=0 Don't show any relations
  • relations=1 (default) Don't show inherited relations
  • relations=2 Show inherited relations (verbose)

How verbosely to show fields

  • fields=0 Don't show any fields
  • fields=1 (default) Show only fields defined on self
  • fields=2 Show inherited fields (verbose)

How verbosely to show ancestors

  • ancestry=0 Don't show any ancestry relations
  • ancestry=1 (default) Show ancestry relations

Include DataObject on the graph

  • include-root=0 (default) Don't graph DataObject
  • include-root=1 Graph DataObject

Group classes by modules

  • group=0 (default) Don't group by modules
  • group=1 Group the modules into their own container

Specify direction graph is laid out

  • rankdir=x Where x is TB (default) ,LR,RL, or BT (top-bottom, left-right, right-left, bottom-top)

The Versions

13/02 2017

dev-master

9999999-dev

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

06/02 2017

dev-ss3

dev-ss3

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

06/02 2017

0.0.4

0.0.4.0

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

11/11 2015

0.0.3

0.0.3.0

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

12/12 2013

dev-data_test

dev-data_test

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

10/12 2013

0.0.2

0.0.2.0

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member

09/12 2013

0.0.1

0.0.1.0

Generates data model visualisations from SilverSripe DataObjects, displaying database fields, relations and ancestry

  Sources   Download

BSD-3-Clause

The Requires

 

by Daniel Pickering

permissions cms silverstripe member