public function Matrix::putRootElement in Business Rules 2.x
Same name and namespace in other branches
- 8 src/Util/Flowchart/Matrix.php \Drupal\business_rules\Util\Flowchart\Matrix::putRootElement()
Put the root element at the matrix.
Parameters
\Drupal\business_rules\Util\Flowchart\Element $element: The element.
File
- src/
Util/ Flowchart/ Matrix.php, line 330
Class
- Matrix
- The matrix to handle the Business Rule flowchart.
Namespace
Drupal\business_rules\Util\FlowchartCode
public function putRootElement(Element $element) {
$this
->putElementInPosition($element, 0, 0);
$this->rootElement = $element;
if ($element
->getItem() instanceof BusinessRule) {
$this->numberOfRootItems = count($element
->getItem()
->getItems());
}
}