private function Flowchart::getRootGraph in Business Rules 8
Same name and namespace in other branches
- 2.x src/Util/Flowchart/Flowchart.php \Drupal\business_rules\Util\Flowchart\Flowchart::getRootGraph()
 
Get the root graph.
Parameters
array $root: The Business Rule item.
Return value
array The graph array.
1 call to Flowchart::getRootGraph()
- Flowchart::processMatrix in src/
Util/ Flowchart/ Flowchart.php  - Process the matrix.
 
File
- src/
Util/ Flowchart/ Flowchart.php, line 297  
Class
- Flowchart
 - Class Flowchart.
 
Namespace
Drupal\business_rules\Util\FlowchartCode
private function getRootGraph(array $root) {
  $item = $root['element']
    ->getItem();
  $meta_data = self::getMetaData($item);
  $x = $root['x'];
  $y = $root['y'];
  $label = str_replace('""', '', $item
    ->label());
  $output = [];
  $output[] = '<UserObject label="' . $label . '" link="' . $meta_data['link'] . '" id="' . $root['element']
    ->getUuid() . '">';
  $output[] = '<mxCell style="' . $meta_data['style'] . '" parent="1" vertex="1">';
  $output[] = '<mxGeometry x="' . $x . '" y="' . $y . '" width="120" height="60" as="geometry"/>';
  $output[] = '</mxCell>';
  $output[] = '</UserObject>';
  return $output;
}