public function Matrix::rightCellIsEmpty in Business Rules 2.x
Same name and namespace in other branches
- 8 src/Util/Flowchart/Matrix.php \Drupal\business_rules\Util\Flowchart\Matrix::rightCellIsEmpty()
Check if the cell at right from the element is empty.
Parameters
\Drupal\business_rules\Util\Flowchart\Element $element: The element.
Return value
bool TRUE|FALSE.
File
- src/
Util/ Flowchart/ Matrix.php, line 481
Class
- Matrix
- The matrix to handle the Business Rule flowchart.
Namespace
Drupal\business_rules\Util\FlowchartCode
public function rightCellIsEmpty(Element $element) {
$cell = $this
->getCellByElementUuid($element
->getUuid());
$index_x = $cell['index_x'];
$index_y = $cell['index_y'];
$right_cell = $this
->getCellByPosition($index_x + 1, $index_y);
if (empty($right_cell['element'])) {
$empty = TRUE;
}
else {
$empty = FALSE;
}
return $empty;
}