mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 02:01:37 +00:00
So that their metadata can be read without having to create instances and fullfill dependancy injection just to list. Also added title to interface prefs page.
25 lines
613 B
PHP
25 lines
613 B
PHP
<?php
|
|
|
|
namespace BookStack\View\ViewBlocks;
|
|
|
|
use BookStack\Entities\Models\Page;
|
|
use BookStack\View\ViewBlock;
|
|
use Illuminate\Http\Request;
|
|
|
|
class PagesShowAttachments extends ViewBlock
|
|
{
|
|
protected static string $id = 'builtin_pages-show-attachments';
|
|
protected static string $view = 'pages.parts.show-sidebar-section-attachments';
|
|
protected static string $labelTranslationKey = 'entities.pages_attachments';
|
|
|
|
public function withData(array $viewData): array
|
|
{
|
|
/** @var Page $page */
|
|
$page = $viewData['page'];
|
|
|
|
return [
|
|
'page' => $page,
|
|
];
|
|
}
|
|
}
|