You are here

private function HierarchyBreadcrumbBuilder::hierarchyGetNodeParentPrimaryNid in Entity Reference Hierarchy 8

Get the primary parent nid for the given node.

1 call to HierarchyBreadcrumbBuilder::hierarchyGetNodeParentPrimaryNid()
HierarchyBreadcrumbBuilder::hierarchyGetNodePrimaryAncestorNids in src/HierarchyBreadcrumbBuilder.php
Get the ancestor nodes for the given node.

File

src/HierarchyBreadcrumbBuilder.php, line 91
Contains \Drupal\entity_hierarchy\HierarchyBreadcrumbBuilder.

Class

HierarchyBreadcrumbBuilder
Provides a breadcrumb builder for nodes in a book.

Namespace

Drupal\entity_hierarchy

Code

private function hierarchyGetNodeParentPrimaryNid($nid) {
  $nids = $this
    ->hierarchyGetNodeParentNids($nid, 1);
  return current($nids);
}