private function Flowchart::processMatrix in Business Rules 8
Same name and namespace in other branches
- 2.x src/Util/Flowchart/Flowchart.php \Drupal\business_rules\Util\Flowchart\Flowchart::processMatrix()
Process the matrix.
Return value
array The graph items array definition.
2 calls to Flowchart::processMatrix()
- Flowchart::getGraph in src/
Util/ Flowchart/ Flowchart.php - Show the Business Rule workflow for one item.
- Flowchart::getGraphDefinition in src/
Util/ Flowchart/ Flowchart.php - Get the workflow graph definition.
File
- src/
Util/ Flowchart/ Flowchart.php, line 260
Class
- Flowchart
- Class Flowchart.
Namespace
Drupal\business_rules\Util\FlowchartCode
private function processMatrix() {
$root_element = $this->matrix
->getRootElement();
$root_cell = $this->matrix
->getCellByElementUuid($root_element
->getUuid());
$graph = $this
->getRootGraph($root_cell);
$cells = $this->matrix
->getAllCellWithElements();
$this
->processConnections($cells);
foreach ($cells as $cell) {
/** @var \Drupal\business_rules\Util\Flowchart\Element $element */
$element = $cell['element'];
if ($element
->getParent()) {
$graph[] = $this
->getConnection($cell);
}
}
foreach ($cells as $cell) {
/** @var \Drupal\business_rules\Util\Flowchart\Element $element */
$element = $cell['element'];
if ($element
->getParent()) {
$graph = array_merge($graph, $this
->getItemGraph($element));
}
}
return $graph;
}