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

protected Dia $diagram
mixed $srcConnPointsRight
mixed $srcConnPointsLeft
mixed $destConnPointsRight
mixed $destConnPointsLeft
int $masterTableId
int $foreignTableId
mixed $masterTablePos
mixed $foreignTablePos
string $referenceColor

Methods

__construct(Dia $diagram, TableStatsDia $master_table, string $master_field, TableStatsDia $foreign_table, string $foreign_field)

No description

bool|void
relationDraw(bool $showColor)

Draws relation references

Details

__construct(Dia $diagram, TableStatsDia $master_table, string $master_field, TableStatsDia $foreign_table, string $foreign_field)

No description

Parameters

Dia $diagram

The DIA diagram

TableStatsDia $master_table

The master table name

string $master_field

The relation field in the master table

TableStatsDia $foreign_table

The foreign table name

string $foreign_field

The relation field in the foreign table

See also

Relation_Stats_Dia::getXy

bool|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

bool|void

See also

PDF