mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 02:01:37 +00:00
26 lines
637 B
PHP
26 lines
637 B
PHP
<?php
|
|
|
|
namespace BookStack\View\ViewBlocks;
|
|
|
|
use BookStack\Activity\Tools\UserEntityWatchOptions;
|
|
use BookStack\Entities\Models\Book;
|
|
use BookStack\View\ViewBlock;
|
|
use Illuminate\Http\Request;
|
|
|
|
class BooksShowActions extends ViewBlock
|
|
{
|
|
protected string $view = 'books.parts.show-sidebar-section-actions';
|
|
protected string $labelTranslationKey = 'common.actions';
|
|
|
|
public function withData(array $viewData): array
|
|
{
|
|
/** @var Book $book */
|
|
$book = $viewData['book'];
|
|
|
|
return [
|
|
'book' => $book,
|
|
'watchOptions' => new UserEntityWatchOptions(user(), $book),
|
|
];
|
|
}
|
|
}
|