Skip to content
fireproofsocks edited this page Dec 11, 2014 · 2 revisions

Graph

The graph command prints all of an object's attributes and it includes meta data for each defined relation. This is useful for creating seed data or for using the getObjectGraph() and getCollectionGraph methods(). Graph helps you navigate through objects and their relations.

Usage:

php repoman graph [<classname>] [options]

If <classname> is omitted, all available MODX classes will be shown. <classname> must be a recognized MODX object type classname. By default both aggregate and composite relations are shown.

Available options are:

  • --aggregates (optional) if set, the output will show only aggregate objects.
  • --composites (optional) if set, the output will show only composite objects
  • --packages (optional) use this to load additional packages via addPackage. Format is <package>:<model_path>:<table_prefix> Recommended is to put these into your composer.json files for easier notation.

Examples:

php repoman graph MyObject '--packages=mypkg:/full/path/to/core/components/mypkg/model/:xyz_'