mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Admin][Twig][Component] Replace private with protected constructor parameters
This commit is contained in:
parent
cc4d72579f
commit
f5b5aeb6cc
18 changed files with 29 additions and 29 deletions
|
|
@ -38,8 +38,8 @@ class OrderStatisticsComponent
|
|||
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly CustomerRepositoryInterface $customerRepository,
|
||||
private readonly CustomerStatisticsProviderInterface $statisticsProvider,
|
||||
protected readonly CustomerRepositoryInterface $customerRepository,
|
||||
protected readonly CustomerStatisticsProviderInterface $statisticsProvider,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class ChannelSelectorComponent
|
|||
/**
|
||||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
||||
*/
|
||||
public function __construct(private readonly ChannelRepositoryInterface $channelRepository)
|
||||
public function __construct(protected readonly ChannelRepositoryInterface $channelRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class NewCustomersComponent
|
|||
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly CustomerRepositoryInterface $customerRepository,
|
||||
protected readonly CustomerRepositoryInterface $customerRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ class NewOrdersComponent
|
|||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly OrderRepositoryInterface $orderRepository,
|
||||
private readonly ChannelRepositoryInterface $channelRepository,
|
||||
protected readonly OrderRepositoryInterface $orderRepository,
|
||||
protected readonly ChannelRepositoryInterface $channelRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ class StatisticsComponent
|
|||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly ChannelRepositoryInterface $channelRepository,
|
||||
private readonly StatisticsProviderInterface $statisticsProvider,
|
||||
protected readonly ChannelRepositoryInterface $channelRepository,
|
||||
protected readonly StatisticsProviderInterface $statisticsProvider,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class AddressHistoryComponent
|
|||
|
||||
/** @param RepositoryInterface<AddressLogEntry> $addressLogRepository */
|
||||
public function __construct(
|
||||
private readonly RepositoryInterface $addressLogRepository,
|
||||
protected readonly RepositoryInterface $addressLogRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
|
|||
#[AsTwigComponent]
|
||||
class ProductTaxonsComponent
|
||||
{
|
||||
public function __construct(private readonly AllTaxonsInterface $allTaxons)
|
||||
public function __construct(protected readonly AllTaxonsInterface $allTaxons)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ class FormComponent
|
|||
FormFactoryInterface $formFactory,
|
||||
string $resourceClass,
|
||||
string $formClass,
|
||||
private readonly SlugGeneratorInterface $slugGenerator,
|
||||
private readonly RepositoryInterface $productAttributeRepository,
|
||||
private readonly ProductFactoryInterface $productFactory,
|
||||
protected readonly SlugGeneratorInterface $slugGenerator,
|
||||
protected readonly RepositoryInterface $productAttributeRepository,
|
||||
protected readonly ProductFactoryInterface $productFactory,
|
||||
) {
|
||||
$this->initialize($productRepository, $formFactory, $resourceClass, $formClass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class ProductAttributeAutocompleteComponent
|
|||
use TemplatePropTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly ChecksumCalculator $checksumCalculator,
|
||||
protected readonly ChecksumCalculator $checksumCalculator,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class FormComponent
|
|||
FormFactoryInterface $formFactory,
|
||||
string $resourceClass,
|
||||
string $formClass,
|
||||
private readonly ProductVariantFactoryInterface $productVariantFactory,
|
||||
private readonly ProductRepositoryInterface $productRepository,
|
||||
protected readonly ProductVariantFactoryInterface $productVariantFactory,
|
||||
protected readonly ProductRepositoryInterface $productRepository,
|
||||
) {
|
||||
$this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ class GeneratorInstructionFormComponent
|
|||
use TemplatePropTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly FormFactoryInterface $formFactory,
|
||||
private readonly string $formClass,
|
||||
protected readonly FormFactoryInterface $formFactory,
|
||||
protected readonly string $formClass,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
|||
class NotificationsComponent
|
||||
{
|
||||
public function __construct(
|
||||
private readonly NotificationProviderInterface $notificationProvider,
|
||||
private readonly bool $areNotificationsEnabled,
|
||||
protected readonly NotificationProviderInterface $notificationProvider,
|
||||
protected readonly bool $areNotificationsEnabled,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
|||
class ShopPreviewComponent
|
||||
{
|
||||
/** @param ChannelRepositoryInterface<ChannelInterface> $channelRepository */
|
||||
public function __construct(private readonly ChannelRepositoryInterface $channelRepository)
|
||||
public function __construct(protected readonly ChannelRepositoryInterface $channelRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
|||
class UserDropdownComponent
|
||||
{
|
||||
public function __construct(
|
||||
private readonly UrlGeneratorInterface $urlGenerator,
|
||||
private readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider,
|
||||
protected readonly UrlGeneratorInterface $urlGenerator,
|
||||
protected readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
|||
class RenderEntityWithTemplateComponent
|
||||
{
|
||||
public function __construct(
|
||||
private EntityManagerInterface $entityManager,
|
||||
protected EntityManagerInterface $entityManager,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ final class DeleteComponent
|
|||
public string $taxonId = '';
|
||||
|
||||
public function __construct(
|
||||
private readonly CsrfTokenManagerInterface $csrfTokenManager,
|
||||
protected readonly CsrfTokenManagerInterface $csrfTokenManager,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class FormComponent
|
|||
FormFactoryInterface $formFactory,
|
||||
string $resourceClass,
|
||||
string $formClass,
|
||||
private readonly TaxonSlugGeneratorInterface $slugGenerator,
|
||||
protected readonly TaxonSlugGeneratorInterface $slugGenerator,
|
||||
) {
|
||||
$this->initialize($repository, $formFactory, $resourceClass, $formClass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ class TreeComponent
|
|||
|
||||
/** @param TaxonRepositoryInterface<TaxonInterface> $taxonRepository */
|
||||
public function __construct(
|
||||
private readonly AllTaxonsInterface $allTaxons,
|
||||
private readonly TaxonRepositoryInterface $taxonRepository,
|
||||
private readonly ObjectManager $taxonManager,
|
||||
protected readonly AllTaxonsInterface $allTaxons,
|
||||
protected readonly TaxonRepositoryInterface $taxonRepository,
|
||||
protected readonly ObjectManager $taxonManager,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue