forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.4-develop' into ACQE-6192_mainline_PR_deployment
- Loading branch information
Showing
17 changed files
with
491 additions
and
99 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Catalog/Model/Category/Attribute/Backend/DefaultSortby.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* Copyright 2024 Adobe | ||
* All Rights Reserved. | ||
* | ||
* NOTICE: All information contained herein is, and remains | ||
* the property of Adobe and its suppliers, if any. The intellectual | ||
* and technical concepts contained herein are proprietary to Adobe | ||
* and its suppliers and are protected by all applicable intellectual | ||
* property laws, including trade secret and copyright laws. | ||
* Dissemination of this information or reproduction of this material | ||
* is strictly forbidden unless prior written permission is obtained | ||
* from Adobe. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Catalog\Model\Category\Attribute\Backend; | ||
|
||
class DefaultSortby extends Sortby | ||
{ | ||
} |
83 changes: 83 additions & 0 deletions
83
app/code/Magento/Catalog/Setup/Patch/Data/UpdateDefaultSortyByBackendType.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?php | ||
/** | ||
* Copyright 2024 Adobe | ||
* All Rights Reserved. | ||
* | ||
* NOTICE: All information contained herein is, and remains | ||
* the property of Adobe and its suppliers, if any. The intellectual | ||
* and technical concepts contained herein are proprietary to Adobe | ||
* and its suppliers and are protected by all applicable intellectual | ||
* property laws, including trade secret and copyright laws. | ||
* Dissemination of this information or reproduction of this material | ||
* is strictly forbidden unless prior written permission is obtained | ||
* from Adobe. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Catalog\Setup\Patch\Data; | ||
|
||
use Magento\Catalog\Setup\CategorySetup; | ||
use Magento\Catalog\Setup\CategorySetupFactory; | ||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Framework\Setup\Patch\DataPatchInterface; | ||
use Magento\Framework\Setup\Patch\PatchInterface; | ||
|
||
class UpdateDefaultSortyByBackendType implements DataPatchInterface | ||
{ | ||
/** | ||
* @var ModuleDataSetupInterface | ||
*/ | ||
private $moduleDataSetup; | ||
|
||
/** | ||
* @var CategorySetupFactory | ||
*/ | ||
private $categorySetupFactory; | ||
|
||
/** | ||
* PatchInitial constructor. | ||
* @param ModuleDataSetupInterface $moduleDataSetup | ||
* @param CategorySetupFactory $categorySetupFactory | ||
*/ | ||
public function __construct( | ||
ModuleDataSetupInterface $moduleDataSetup, | ||
CategorySetupFactory $categorySetupFactory | ||
) { | ||
$this->moduleDataSetup = $moduleDataSetup; | ||
$this->categorySetupFactory = $categorySetupFactory; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function apply(): UpdateDefaultSortyByBackendType | ||
{ | ||
$mediaBackendModel = \Magento\Catalog\Model\Category\Attribute\Backend\DefaultSortby::class; | ||
/** @var CategorySetup $categorySetup */ | ||
$categorySetup = $this->categorySetupFactory->create(['setup' => $this->moduleDataSetup]); | ||
$categorySetup->updateAttribute( | ||
'catalog_category', | ||
'default_sort_by', | ||
'backend_model', | ||
$mediaBackendModel | ||
); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.