mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 02:01:37 +00:00
24 lines
498 B
PHP
24 lines
498 B
PHP
<?php
|
|
|
|
namespace BookStack\View\ViewBlocks;
|
|
|
|
use BookStack\Entities\Models\Book;
|
|
use BookStack\View\ViewBlock;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ChaptersShowBookTree extends ViewBlock
|
|
{
|
|
protected string $view = 'entities.book-tree';
|
|
|
|
public function withData(array $viewData, Request $request): array
|
|
{
|
|
/** @var Book $book */
|
|
$book = $viewData['book'];
|
|
|
|
return [
|
|
'book' => $book,
|
|
'bookTree' => $viewData['bookTree'],
|
|
];
|
|
}
|
|
}
|