Development

#1330 (enable support for model visualization (graphviz))

You must first sign up to be able to contribute.

Ticket #1330 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

enable support for model visualization (graphviz)

Reported by: roga.moore Assigned to: fabien
Priority: minor Milestone: 1.1.0
Component: cache Version: 1.0.0-beta2
Keywords: Cc:
Qualification:

Description

Adding some simple lines enables propel's graphviz dot file generation:

in /data/symfony/tasks/sfPakePropel.php add:

pake_desc('create a graphviz dot file for current model');
pake_task('propel-graphviz', 'project_exists');

and

function run_propel_graphviz($task, $args)
{
  _propel_convert_yml_schema(false, 'generated-');
  _propel_copy_xml_schema_from_plugins('generated-');
  _call_phing($task, 'graphviz');
  $finder = pakeFinder::type('file')->name('generated-*schema.xml');
  pake_remove($finder, array('config', 'plugins'));
}

Now you can use it like that:

> symfony propel-graphviz
...
propel > graphviz:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Generating Graphiz for YOUR Propel       |
     [echo] | project!                                 |
     [echo] |                                          |
     [echo] +------------------------------------------+
...

This creates a folder "graph" in your projects folder containing a "schema.dot" file which can be converted to e.g. a PNG file using the graphviz package from http://www.graphviz.org/

Change History

01/12/07 21:14:52 changed by fabien

  • milestone set to post-1.0.

04/13/07 09:10:31 changed by fabien

  • owner set to fabien.
  • component set to cache.
  • milestone changed from post-1.0 to 1.1.0.

09/14/07 19:28:04 changed by KRavEN

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification set to Unreviewed.

There is no need to edit /data/symfony/tasks/sfPakePropel.php I made his changes into a plugin http://trac.symfony-project.com/trac/wiki/sfPropelGraphviz

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.