- Move 12 markdown files from root to docs/ subdirectories - Organize documentation by category: • docs/troubleshooting/ (1 file) - Technical troubleshooting guides • docs/deployment/ (4 files) - Deployment and security documentation • docs/guides/ (3 files) - Feature-specific guides • docs/planning/ (4 files) - Planning and improvement proposals Root directory cleanup: - Reduced from 16 to 4 markdown files in root - Only essential project files remain: • CLAUDE.md (AI instructions) • README.md (Main project readme) • CLEANUP_PLAN.md (Current cleanup plan) • SRC_STRUCTURE_IMPROVEMENTS.md (Structure improvements) This improves: ✅ Documentation discoverability ✅ Logical organization by purpose ✅ Clean root directory ✅ Better maintainability
50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Application\Admin\Content;
|
|
|
|
use App\Application\Admin\Service\AdminLayoutProcessor;
|
|
use App\Domain\Media\ImageRepository;
|
|
use App\Domain\Media\ImageSlotRepository;
|
|
use App\Framework\Attributes\Route;
|
|
use App\Framework\Auth\Auth;
|
|
use App\Framework\DateTime\Clock;
|
|
use App\Framework\Http\Method;
|
|
use App\Framework\Meta\MetaData;
|
|
use App\Framework\Router\Result\ViewResult;
|
|
|
|
final readonly class ImageManagerController
|
|
{
|
|
public function __construct(
|
|
private ImageSlotRepository $slotRepository,
|
|
private ImageRepository $imageRepository,
|
|
private AdminLayoutProcessor $layoutProcessor,
|
|
private Clock $clock,
|
|
) {
|
|
}
|
|
|
|
#[Route(path: '/admin/content/images', method: Method::GET, name: 'admin.content.images')]
|
|
// #[Auth(strategy: 'ip', allowedIps: ['127.0.0.1', '::1'])]
|
|
public function show(): ViewResult
|
|
{
|
|
$slots = $this->slotRepository->findAllWithImages();
|
|
$images = $this->imageRepository->findAll(100, 0);
|
|
|
|
$data = [
|
|
'title' => 'Image Manager',
|
|
'slots' => $slots,
|
|
'images' => $images,
|
|
'current_year' => $this->clock->now()->format('Y'),
|
|
];
|
|
|
|
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
|
|
|
return new ViewResult(
|
|
'image-manager',
|
|
new MetaData('Image Manager'),
|
|
$finalData
|
|
);
|
|
}
|
|
}
|