You are here

public function Element::__construct in Business Rules 8

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

Element constructor.

Parameters

\Drupal\Core\Entity\EntityInterface|null $item: The entity.

\Drupal\business_rules\Util\Flowchart\Element|null $parent: The parent entity.

string $originUUid: The uuid for the origin element. The arrow beginning.

string $arrowLabel: The arrow label.

File

src/Util/Flowchart/Element.php, line 61

Class

Element
Class Element.

Namespace

Drupal\business_rules\Util\Flowchart

Code

public function __construct(EntityInterface $item = NULL, Element $parent = NULL, $originUUid = '', $arrowLabel = '') {
  $this
    ->setItem($item);
  $this->parent = $parent;
  $this
    ->setOriginUuid($originUUid);
  $this
    ->setArrowLabel($arrowLabel);
  $this->uuid = \Drupal::service('uuid')
    ->generate();
}