You are here

public function InsertPosition::__construct in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Storage/InsertPosition.php \Drupal\entity_hierarchy\Storage\InsertPosition::__construct()

Constructs a new InsertPosition object.

Parameters

\PNX\NestedSet\Node $reference: Node to insert before or after.

bool $insert: TRUE if inserting rather than moving.

string $direction: Direction constants - one of Before/After/Below.

File

src/Storage/InsertPosition.php, line 49

Class

InsertPosition
Defines a value object for an insert position.

Namespace

Drupal\entity_hierarchy\Storage

Code

public function __construct(Node $reference, $insert = TRUE, $direction = self::DIRECTION_BEFORE) {
  $this->reference = $reference;
  $this->direction = $direction;
  $this->insert = $insert;
}