class RelationStatsDia (View source)

Relation preferences/statistics

This class fetches the table master and foreign fields positions and helps in generating the Table references and then connects master table's master field to foreign table's foreign key in dia XML document.

Properties

mixed $srcConnPointsRight
mixed $srcConnPointsLeft
mixed $destConnPointsRight
mixed $destConnPointsLeft
int $masterTableId
int $foreignTableId
string $referenceColor

Methods

__construct(Dia $diagram, TableStatsDia $masterTable, string $masterField, TableStatsDia $foreignTable, string $foreignField)

No description

void
relationDraw(bool $showColor)

Draws relation references

Details

__construct(Dia $diagram, TableStatsDia $masterTable, string $masterField, TableStatsDia $foreignTable, string $foreignField)

No description

Parameters

Dia $diagram

The DIA diagram

TableStatsDia $masterTable

The master table name

string $masterField

The relation field in the master table

TableStatsDia $foreignTable

The foreign table name

string $foreignField

The relation field in the foreign table

See also

Relation_Stats_Dia::getXy

void relationDraw(bool $showColor)

Draws relation references

connects master table's master field to foreign table's foreign field using Dia object type Database - Reference Dia object is used to generate the XML of Dia Document. Database reference Object and their attributes are involved in the combination of displaying Database - reference on Dia Document.

Parameters

bool $showColor

Whether to use one color per relation or not if showColor is true then an array of $listOfColors will be used to choose the random colors for references lines. we can change/add more colors to this

Return Value

void

See also

PDF