File tree Expand file tree Collapse file tree
Model/AdvancedSearch/Filter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,4 +321,9 @@ public function isMainDomainWithinSameBaseUrlGroup(DomainConfig $domainConfig):
321321
322322 return true ;
323323 }
324+
325+ public function anyDomainHasLocale (string $ locale ): bool
326+ {
327+ return in_array ($ locale , $ this ->getAllLocales (), true );
328+ }
324329}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Shopsys \FrameworkBundle \Migrations ;
6+
7+ use Doctrine \DBAL \Schema \Schema ;
8+ use Override ;
9+ use Shopsys \MigrationBundle \Component \Doctrine \Migrations \AbstractMigration ;
10+
11+ class Version20260223133152 extends AbstractMigration
12+ {
13+ #[Override]
14+ public function up (Schema $ schema ): void
15+ {
16+ $ this ->sql ('ALTER TABLE heureka_category ADD locale VARCHAR(255) NOT NULL DEFAULT \'cs \'' );
17+ $ this ->sql ('ALTER TABLE heureka_category ALTER locale DROP DEFAULT ' );
18+
19+ $ this ->sql ('ALTER TABLE heureka_category ADD heureka_id INT NOT NULL DEFAULT 0 ' );
20+ $ this ->sql ('ALTER TABLE heureka_category ALTER heureka_id DROP DEFAULT ' );
21+ $ this ->sql ('UPDATE heureka_category SET heureka_id = id ' );
22+
23+ $ this ->sql ('CREATE SEQUENCE heureka_category_id_seq ' );
24+ $ this ->sql ('SELECT setval( \'heureka_category_id_seq \', (SELECT MAX(id) FROM heureka_category)) ' );
25+ $ this ->sql ('ALTER TABLE heureka_category ALTER id SET DEFAULT nextval( \'heureka_category_id_seq \') ' );
26+
27+ $ this ->sql ('DROP INDEX uniq_fe112a6912469de2; ' );
28+
29+ $ this ->sql ('CREATE UNIQUE INDEX uq_heureka_category_heureka_id_locale ON heureka_category (locale, heureka_id) ' );
30+ $ this ->sql ('CREATE INDEX IDX_FE112A6912469DE2 ON heureka_category_categories (category_id) ' );
31+ }
32+ }
Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ public function getValueFormOptions(): array
7373 return $ padding . $ category ->getName ();
7474 },
7575 'choice_value ' => 'id ' ,
76- 'attr ' => ['class ' => 'js-autocomplete-selectbox ' ],
7776 ];
7877 }
7978
You can’t perform that action at this time.
0 commit comments