$this->pages, 'chapter' => $this->chapters, 'book' => $this->books, 'bookshelf' => $this->shelves, default => null, }; if (is_null($queries)) { return null; } return $queries->findVisibleById($entityId); } }