feat(domain): Domain\Scontainers + Domain\Banners repositories z wrapper delegation
Phase 3 complete: - ScontainersRepository: containerDetails, containerSave, containerDelete, scontainerByLang - BannersRepository: bannerDetails, bannerSave, bannerDelete, activeBanners, mainBanner - 4 legacy factories converted to thin wrappers delegating to Domain repos Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,18 +6,7 @@ class Scontainers
|
||||
public static function scontainer_details( $scontainer_id )
|
||||
{
|
||||
global $mdb, $lang;
|
||||
|
||||
if ( !$scontainer = \Cache::fetch( "scontainer_details:$scontainer_id:" . $lang[0] ) )
|
||||
{
|
||||
$scontainer = $mdb -> get( 'pp_scontainers', '*', [ 'id' => (int)$scontainer_id ] );
|
||||
|
||||
$results = $mdb -> select( 'pp_scontainers_langs', '*', [ 'AND' => [ 'container_id' => (int)$scontainer_id, 'lang_id' => $lang[0] ] ] );
|
||||
if ( is_array( $results ) ) foreach ( $results as $row )
|
||||
$scontainer['languages'] = $row;
|
||||
|
||||
\Cache::store( "scontainer_details:$scontainer_id:" . $lang[0], $scontainer );
|
||||
}
|
||||
|
||||
return $scontainer;
|
||||
$repo = new \Domain\Scontainers\ScontainersRepository($mdb);
|
||||
return $repo->scontainerByLang($scontainer_id, $lang[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user