getData()['crumbs']; $firstCrumb = $crumbs[0] ?? null; if ($firstCrumb instanceof Book) { $shelf = $this->shelfContext->getContextualShelfForBook($firstCrumb); if ($shelf) { array_unshift($crumbs, $shelf); $view->with('crumbs', $crumbs); } } } }