공개 (@Tuwasduliebst 제보) 대응. - ckeditor5: 미참조 이미지 정리 엔진 신설 — 참조 판정(hash + 파일명 2토큰, filter_reference_sources 훅으로 확장 콘텐츠 등록) + 정리 커맨드(기본 꺼짐 옵트인, 3중 게이트) + 업로드 관리 화면(권한 분리·참조 배지·개별/선택 삭제) + 기설치본 설정 백필 upgrade step - board: 임시 첨부 GC(상시) + 소프트삭제 첨부 영구 정리(옵트인) + 설정 UI, 저장 payload 누락(F4)·빈 temp 디렉토리 잔존(F5) 수정 - ecommerce: 임시 상품 이미지 GC + 카테고리 삭제 시 이미지 파일 미삭제(S4) 수정 - page: 임시 첨부 GC - 코어: 고아 첨부 정리 커맨드(옵트인, site_logo 보호) + 사이트 로고 교체 시 구 로고 재편입 차단(S6) + DB 백업 미구현 501 정직화(B3) + 플러그인 관리자 메뉴 설치·업데이트 자동 동기화(F1·F7) - 동반: 플러그인 설정 검증 오류 필드명 라벨화(F3), Toggle 노드 type 정정 수평 전개(marketing 1.0.2 bump·gdpr·ecommerce), ja 언어팩 4종, API 문서, hooks.md, 시나리오 매니페스트 8종, Playwright E2E 4종
76 lines
2.4 KiB
PHP
76 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace Modules\Sirsoft\Page\Providers;
|
|
|
|
use App\Extension\BaseModuleServiceProvider;
|
|
use App\Seo\SitemapGenerator;
|
|
use Modules\Sirsoft\Page\Console\Commands\PlaywrightSeedPage;
|
|
use Modules\Sirsoft\Page\Console\Commands\PruneTempAttachmentsCommand;
|
|
use Modules\Sirsoft\Page\Repositories\Contracts\PageAttachmentRepositoryInterface;
|
|
use Modules\Sirsoft\Page\Repositories\Contracts\PageRepositoryInterface;
|
|
use Modules\Sirsoft\Page\Repositories\Contracts\PageVersionRepositoryInterface;
|
|
use Modules\Sirsoft\Page\Repositories\PageAttachmentRepository;
|
|
use Modules\Sirsoft\Page\Repositories\PageRepository;
|
|
use Modules\Sirsoft\Page\Repositories\PageVersionRepository;
|
|
use Modules\Sirsoft\Page\Seo\PageSitemapContributor;
|
|
use Modules\Sirsoft\Page\Services\PageAttachmentService;
|
|
|
|
/**
|
|
* Page 모듈 서비스 프로바이더
|
|
*
|
|
* Repository 인터페이스와 구현체 바인딩을 담당합니다.
|
|
*/
|
|
class PageServiceProvider extends BaseModuleServiceProvider
|
|
{
|
|
/**
|
|
* 모듈 식별자
|
|
*/
|
|
protected string $moduleIdentifier = 'sirsoft-page';
|
|
|
|
/**
|
|
* StorageInterface가 필요한 서비스 목록
|
|
*
|
|
* @var array<int, class-string>
|
|
*/
|
|
protected array $storageServices = [
|
|
PageAttachmentService::class,
|
|
];
|
|
|
|
/**
|
|
* Repository 인터페이스와 구현체 매핑
|
|
*
|
|
* @var array<class-string, class-string>
|
|
*/
|
|
protected array $repositories = [
|
|
PageRepositoryInterface::class => PageRepository::class,
|
|
PageVersionRepositoryInterface::class => PageVersionRepository::class,
|
|
PageAttachmentRepositoryInterface::class => PageAttachmentRepository::class,
|
|
];
|
|
|
|
/**
|
|
* 서비스 부트스트랩
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
// Artisan 커맨드 등록 (콘솔 환경에서만)
|
|
if ($this->app->runningInConsole()) {
|
|
$this->commands([
|
|
PlaywrightSeedPage::class,
|
|
PruneTempAttachmentsCommand::class,
|
|
]);
|
|
}
|
|
|
|
// Sitemap 기여자 등록
|
|
$this->app->booted(function () {
|
|
if ($this->app->bound(SitemapGenerator::class)) {
|
|
// Repository 주입을 위해 컨테이너로 해석합니다.
|
|
$this->app->make(SitemapGenerator::class)->registerContributor(
|
|
$this->app->make(PageSitemapContributor::class)
|
|
);
|
|
}
|
|
});
|
|
}
|
|
}
|