You are here

private function Flowchart::getConnection in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Util/Flowchart/Flowchart.php \Drupal\business_rules\Util\Flowchart\Flowchart::getConnection()

Get the connection's graph definition.

Parameters

array $cell: The matrix cell.

Return value

string The connection graph.

1 call to Flowchart::getConnection()
Flowchart::processMatrix in src/Util/Flowchart/Flowchart.php
Process the matrix.

File

src/Util/Flowchart/Flowchart.php, line 339

Class

Flowchart
Class Flowchart.

Namespace

Drupal\business_rules\Util\Flowchart

Code

private function getConnection(array $cell) {
  $child_id = $cell['element']
    ->getUuid();
  $parent_id = $cell['element']
    ->getOriginUuid();
  $label = str_replace('"', '', $cell['element']
    ->getArrowLabel());
  $connection = '<mxCell id="arrow-' . $child_id . '" value="' . $label . '" style="endArrow=classic;html=1;strokeWidth=3;strokeColor=#000000;fontSize=13;fontColor=#000000;fontStyle=1;labelBackgroundColor=#FFFFFF;" parent="1" source="' . $parent_id . '" target="' . $child_id . '" edge="1"><mxGeometry as="geometry"/></mxCell>';
  return $connection;
}