private readonly SalesChannelDefinitionInstanceRegistry
$registry,
private readonly RequestCriteriaBuilder
$criteriaBuilder ) { } public function factory(Hook
$hook, Script
$script): SalesChannelRepositoryFacade
{ if (!
$hook instanceof SalesChannelContextAware
) { throw new HookInjectionException($hook, self::
class, SalesChannelContextAware::
class);
} return new SalesChannelRepositoryFacade( $this->registry,
$this->criteriaBuilder,
$hook->
getSalesChannelContext() );
} public function getName(): string
{ return 'store';
}}