ver. 0.286: Layouts, Menu, Pages frontend migration to Domain
- Add 6 frontend methods to LayoutsRepository (Redis cache, 3-level fallback) - Add 6 frontend methods to PagesRepository (Redis cache, recursive pages) - Create front\Views\Menu (clean VIEW replacing front\view\Menu) - Delete front\factory\Layouts, Menu, Pages + front\view\Menu + dead submenu.php - Fix null $lang_id TypeError in check_url_params() (remove string type hint + ?? '') - Optimize Helpers::htacces() from 3 layout calls to 1 - Tests: 470 OK, 1484 assertions (+16 new) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -132,9 +132,11 @@ if ($request_uri != '')
|
||||
}
|
||||
}
|
||||
|
||||
$pagesRepo = new \Domain\Pages\PagesRepository( $mdb );
|
||||
|
||||
if ( \Shared\Helpers\Helpers::get( 'a' ) == 'page' and \Shared\Helpers\Helpers::get( 'id' ) )
|
||||
{
|
||||
$page = \front\factory\Pages::page_details( \Shared\Helpers\Helpers::get( 'id' ) );
|
||||
$page = $pagesRepo->frontPageDetails( \Shared\Helpers\Helpers::get( 'id' ), $lang_id );
|
||||
\Shared\Helpers\Helpers::set_session( 'page', $page );
|
||||
}
|
||||
|
||||
@@ -145,7 +147,7 @@ if ( !is_array( $page ) or !(int)$page['id'] )
|
||||
|
||||
if ( !is_array( $page ) or !(int)$page['id'] )
|
||||
{
|
||||
$page = \front\factory\Pages::page_details();
|
||||
$page = $pagesRepo->frontPageDetails( '', $lang_id );
|
||||
\Shared\Helpers\Helpers::set_session( 'page', $page );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user