Skip to content

Commit 62a1991

Browse files
authored
Removed all functionality related to DomainConfig::$stylesDirectory and DomainConfig::$designId (#3720)
2 parents 187b967 + 5646951 commit 62a1991

File tree

6 files changed

+0
-51
lines changed

6 files changed

+0
-51
lines changed

src/Component/Domain/Config/DomainConfig.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
class DomainConfig
1010
{
11-
public const STYLES_DIRECTORY_DEFAULT = 'common';
12-
1311
public const TYPE_B2C = 'b2c';
1412
public const TYPE_B2B = 'b2b';
1513

@@ -19,8 +17,6 @@ class DomainConfig
1917
* @param string $name
2018
* @param string $locale
2119
* @param \DateTimeZone $dateTimeZone
22-
* @param string $stylesDirectory
23-
* @param string|null $designId
2420
* @param string $type
2521
* @param bool $loadDemoData
2622
*/
@@ -30,8 +26,6 @@ public function __construct(
3026
protected string $name,
3127
protected string $locale,
3228
protected DateTimeZone $dateTimeZone,
33-
protected string $stylesDirectory = self::STYLES_DIRECTORY_DEFAULT,
34-
protected ?string $designId = null,
3529
protected string $type = self::TYPE_B2C,
3630
protected readonly bool $loadDemoData = true,
3731
) {
@@ -69,22 +63,6 @@ public function getLocale()
6963
return $this->locale;
7064
}
7165

72-
/**
73-
* @return string
74-
*/
75-
public function getStylesDirectory()
76-
{
77-
return $this->stylesDirectory;
78-
}
79-
80-
/**
81-
* @return string|null
82-
*/
83-
public function getDesignId()
84-
{
85-
return $this->designId;
86-
}
87-
8866
/**
8967
* @return bool
9068
*/

src/Component/Domain/Config/DomainsConfigDefinition.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class DomainsConfigDefinition implements ConfigurationInterface
1414
public const string CONFIG_NAME = 'name';
1515
public const string CONFIG_LOCALE = 'locale';
1616
public const string CONFIG_TIMEZONE = 'timezone';
17-
public const string CONFIG_STYLES_DIRECTORY = 'styles_directory';
18-
public const string CONFIG_DESIGN_ID = 'design_id';
1917
public const string CONFIG_TYPE = 'type';
2018
public const string CONFIG_LOAD_DEMO_DATA = 'load_demo_data';
2119

@@ -38,10 +36,6 @@ public function getConfigTreeBuilder(): TreeBuilder
3836
->scalarNode(self::CONFIG_NAME)->isRequired()->cannotBeEmpty()->end()
3937
->scalarNode(self::CONFIG_LOCALE)->isRequired()->cannotBeEmpty()->end()
4038
->scalarNode(self::CONFIG_TIMEZONE)->isRequired()->cannotBeEmpty()->end()
41-
->scalarNode(self::CONFIG_STYLES_DIRECTORY)->defaultValue(
42-
DomainConfig::STYLES_DIRECTORY_DEFAULT,
43-
)->end()
44-
->scalarNode(self::CONFIG_DESIGN_ID)->defaultNull()->end()
4539
->scalarNode(self::CONFIG_TYPE)->defaultValue(
4640
DomainConfig::TYPE_B2C,
4741
)->end()

src/Component/Domain/Config/DomainsConfigLoader.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ protected function processDomainConfigArray(array $domainConfig)
9393
$domainConfig[DomainsConfigDefinition::CONFIG_NAME],
9494
$domainConfig[DomainsConfigDefinition::CONFIG_LOCALE],
9595
new DateTimeZone($domainConfig[DomainsConfigDefinition::CONFIG_TIMEZONE]),
96-
$domainConfig[DomainsConfigDefinition::CONFIG_STYLES_DIRECTORY],
97-
$domainConfig[DomainsConfigDefinition::CONFIG_DESIGN_ID],
9896
$domainConfig[DomainsConfigDefinition::CONFIG_TYPE],
9997
$domainConfig[DomainsConfigDefinition::CONFIG_LOAD_DEMO_DATA],
10098
);

src/Component/Domain/Domain.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ public function getUrl()
6868
return $this->getCurrentDomainConfig()->getUrl();
6969
}
7070

71-
/**
72-
* @return string|null
73-
*/
74-
public function getDesignId()
75-
{
76-
return $this->getCurrentDomainConfig()->getDesignId();
77-
}
78-
7971
/**
8072
* @return bool
8173
*/

src/Component/Domain/DomainFactoryOverwritingDomainUrl.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ public function overwriteDomainUrl(array $domainConfigs)
7070
$domainConfig->getName(),
7171
$domainConfig->getLocale(),
7272
$domainConfig->getDateTimeZone(),
73-
$domainConfig->getStylesDirectory(),
74-
$domainConfig->getDesignId(),
7573
$domainConfig->getType(),
7674
);
7775
}

src/Form/WysiwygTypeExtension.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Shopsys\FrameworkBundle\Form;
66

77
use FOS\CKEditorBundle\Form\Type\CKEditorType;
8-
use Shopsys\FrameworkBundle\Component\Domain\Domain;
98
use Shopsys\FrameworkBundle\Form\Transformers\WysiwygCdnDataTransformer;
109
use Shopsys\FrameworkBundle\Model\Localization\Localization;
1110
use Symfony\Component\Form\AbstractTypeExtension;
@@ -18,16 +17,12 @@ class WysiwygTypeExtension extends AbstractTypeExtension
1817

1918
protected const ADMIN_WYSIWYG_ENTRY = 'admin-wysiwyg';
2019

21-
protected const FRONTEND_WYSIWYG_ENTRY_PREFIX = 'frontend-wysiwyg-';
22-
2320
/**
24-
* @param \Shopsys\FrameworkBundle\Component\Domain\Domain $domain
2521
* @param \Shopsys\FrameworkBundle\Model\Localization\Localization $localization
2622
* @param string $entrypointsPath
2723
* @param \Shopsys\FrameworkBundle\Form\Transformers\WysiwygCdnDataTransformer $wysiwygCdnDataTransformer
2824
*/
2925
public function __construct(
30-
private readonly Domain $domain,
3126
private readonly Localization $localization,
3227
private readonly string $entrypointsPath,
3328
private readonly WysiwygCdnDataTransformer $wysiwygCdnDataTransformer,
@@ -70,12 +65,6 @@ private function getContentCss(): array
7065
$entrypointsOutput = array_merge($entrypointsOutput, $entrypoints[static::ADMIN_WYSIWYG_ENTRY]['css']);
7166
}
7267

73-
$keyOfFrontendWysiwygLess = static::FRONTEND_WYSIWYG_ENTRY_PREFIX . $this->domain->getCurrentDomainConfig()->getStylesDirectory();
74-
75-
if (array_key_exists($keyOfFrontendWysiwygLess, $entrypoints) === true) {
76-
$entrypointsOutput = array_merge($entrypointsOutput, $entrypoints[$keyOfFrontendWysiwygLess]['css']);
77-
}
78-
7968
return $entrypointsOutput;
8069
}
8170

0 commit comments

Comments
 (0)