ver. 0.288: BasketCalculator + ShopBasketController migration, cms\Layout removal

- Migrate front\factory\ShopBasket → Domain\Basket\BasketCalculator (4 static methods, 18 callers updated)
- Migrate front\controls\ShopBasket → front\Controllers\ShopBasketController (camelCase, instance methods)
- Add snake_case→camelCase action dispatch for new controllers in Site::route()
- Update title()/page_title() to check front\Controllers\ before fallback
- Remove cms\Layout class (replaced by $layoutsRepo->find())
- Add 8 tests for BasketCalculator (484 tests, 1528 assertions)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 09:38:45 +01:00
parent a7e44f23fa
commit 25348797da
22 changed files with 287 additions and 275 deletions

View File

@@ -29,7 +29,7 @@ class Site
$scontainersRepo = new \Domain\Scontainers\ScontainersRepository( $GLOBALS['mdb'] );
if ( (int) \Shared\Helpers\Helpers::get( 'layout_id' ) )
$layout = new \cms\Layout( (int) \Shared\Helpers\Helpers::get( 'layout_id' ) );
$layout = $layoutsRepo->find( (int) \Shared\Helpers\Helpers::get( 'layout_id' ) );
if ( \Shared\Helpers\Helpers::get( 'article' ) )
$layout = $layoutsRepo->getArticleLayout( (int) \Shared\Helpers\Helpers::get( 'article' ) );