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
|
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly CustomerRepositoryInterface $customerRepository,
|
protected readonly CustomerRepositoryInterface $customerRepository,
|
||||||
private readonly CustomerStatisticsProviderInterface $statisticsProvider,
|
protected readonly CustomerStatisticsProviderInterface $statisticsProvider,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ class ChannelSelectorComponent
|
||||||
/**
|
/**
|
||||||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
* @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
|
* @param CustomerRepositoryInterface<CustomerInterface> $customerRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly CustomerRepositoryInterface $customerRepository,
|
protected readonly CustomerRepositoryInterface $customerRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,8 @@ class NewOrdersComponent
|
||||||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly OrderRepositoryInterface $orderRepository,
|
protected readonly OrderRepositoryInterface $orderRepository,
|
||||||
private readonly ChannelRepositoryInterface $channelRepository,
|
protected readonly ChannelRepositoryInterface $channelRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,8 +55,8 @@ class StatisticsComponent
|
||||||
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
* @param ChannelRepositoryInterface<ChannelInterface> $channelRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ChannelRepositoryInterface $channelRepository,
|
protected readonly ChannelRepositoryInterface $channelRepository,
|
||||||
private readonly StatisticsProviderInterface $statisticsProvider,
|
protected readonly StatisticsProviderInterface $statisticsProvider,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class AddressHistoryComponent
|
||||||
|
|
||||||
/** @param RepositoryInterface<AddressLogEntry> $addressLogRepository */
|
/** @param RepositoryInterface<AddressLogEntry> $addressLogRepository */
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly RepositoryInterface $addressLogRepository,
|
protected readonly RepositoryInterface $addressLogRepository,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
|
||||||
#[AsTwigComponent]
|
#[AsTwigComponent]
|
||||||
class ProductTaxonsComponent
|
class ProductTaxonsComponent
|
||||||
{
|
{
|
||||||
public function __construct(private readonly AllTaxonsInterface $allTaxons)
|
public function __construct(protected readonly AllTaxonsInterface $allTaxons)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,9 @@ class FormComponent
|
||||||
FormFactoryInterface $formFactory,
|
FormFactoryInterface $formFactory,
|
||||||
string $resourceClass,
|
string $resourceClass,
|
||||||
string $formClass,
|
string $formClass,
|
||||||
private readonly SlugGeneratorInterface $slugGenerator,
|
protected readonly SlugGeneratorInterface $slugGenerator,
|
||||||
private readonly RepositoryInterface $productAttributeRepository,
|
protected readonly RepositoryInterface $productAttributeRepository,
|
||||||
private readonly ProductFactoryInterface $productFactory,
|
protected readonly ProductFactoryInterface $productFactory,
|
||||||
) {
|
) {
|
||||||
$this->initialize($productRepository, $formFactory, $resourceClass, $formClass);
|
$this->initialize($productRepository, $formFactory, $resourceClass, $formClass);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class ProductAttributeAutocompleteComponent
|
||||||
use TemplatePropTrait;
|
use TemplatePropTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly ChecksumCalculator $checksumCalculator,
|
protected readonly ChecksumCalculator $checksumCalculator,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ class FormComponent
|
||||||
FormFactoryInterface $formFactory,
|
FormFactoryInterface $formFactory,
|
||||||
string $resourceClass,
|
string $resourceClass,
|
||||||
string $formClass,
|
string $formClass,
|
||||||
private readonly ProductVariantFactoryInterface $productVariantFactory,
|
protected readonly ProductVariantFactoryInterface $productVariantFactory,
|
||||||
private readonly ProductRepositoryInterface $productRepository,
|
protected readonly ProductRepositoryInterface $productRepository,
|
||||||
) {
|
) {
|
||||||
$this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass);
|
$this->initialize($productVariantRepository, $formFactory, $resourceClass, $formClass);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ class GeneratorInstructionFormComponent
|
||||||
use TemplatePropTrait;
|
use TemplatePropTrait;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly FormFactoryInterface $formFactory,
|
protected readonly FormFactoryInterface $formFactory,
|
||||||
private readonly string $formClass,
|
protected readonly string $formClass,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
||||||
class NotificationsComponent
|
class NotificationsComponent
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly NotificationProviderInterface $notificationProvider,
|
protected readonly NotificationProviderInterface $notificationProvider,
|
||||||
private readonly bool $areNotificationsEnabled,
|
protected readonly bool $areNotificationsEnabled,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
||||||
class ShopPreviewComponent
|
class ShopPreviewComponent
|
||||||
{
|
{
|
||||||
/** @param ChannelRepositoryInterface<ChannelInterface> $channelRepository */
|
/** @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
|
class UserDropdownComponent
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly UrlGeneratorInterface $urlGenerator,
|
protected readonly UrlGeneratorInterface $urlGenerator,
|
||||||
private readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider,
|
protected readonly LoggedInAdminUserProviderInterface $loggedInAdminUserProvider,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
|
||||||
class RenderEntityWithTemplateComponent
|
class RenderEntityWithTemplateComponent
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private EntityManagerInterface $entityManager,
|
protected EntityManagerInterface $entityManager,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ final class DeleteComponent
|
||||||
public string $taxonId = '';
|
public string $taxonId = '';
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly CsrfTokenManagerInterface $csrfTokenManager,
|
protected readonly CsrfTokenManagerInterface $csrfTokenManager,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class FormComponent
|
||||||
FormFactoryInterface $formFactory,
|
FormFactoryInterface $formFactory,
|
||||||
string $resourceClass,
|
string $resourceClass,
|
||||||
string $formClass,
|
string $formClass,
|
||||||
private readonly TaxonSlugGeneratorInterface $slugGenerator,
|
protected readonly TaxonSlugGeneratorInterface $slugGenerator,
|
||||||
) {
|
) {
|
||||||
$this->initialize($repository, $formFactory, $resourceClass, $formClass);
|
$this->initialize($repository, $formFactory, $resourceClass, $formClass);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,9 @@ class TreeComponent
|
||||||
|
|
||||||
/** @param TaxonRepositoryInterface<TaxonInterface> $taxonRepository */
|
/** @param TaxonRepositoryInterface<TaxonInterface> $taxonRepository */
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly AllTaxonsInterface $allTaxons,
|
protected readonly AllTaxonsInterface $allTaxons,
|
||||||
private readonly TaxonRepositoryInterface $taxonRepository,
|
protected readonly TaxonRepositoryInterface $taxonRepository,
|
||||||
private readonly ObjectManager $taxonManager,
|
protected readonly ObjectManager $taxonManager,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue