-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into MAGETWO-59702
- Loading branch information
Showing
173 changed files
with
1,579 additions
and
371 deletions.
There are no files selected for viewing
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
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
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
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
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
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
44 changes: 44 additions & 0 deletions
44
app/code/Magento/Checkout/Model/Cart/RequestInfoFilter.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,44 @@ | ||
<?php | ||
/** | ||
* | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Checkout\Model\Cart; | ||
|
||
/** | ||
* Class RequestInfoFilter used for filtering data from a request | ||
*/ | ||
class RequestInfoFilter implements RequestInfoFilterInterface | ||
{ | ||
/** | ||
* @var array $params | ||
*/ | ||
private $filterList; | ||
|
||
/** | ||
* @param array $filterList | ||
*/ | ||
public function __construct( | ||
array $filterList = [] | ||
) { | ||
$this->filterList = $filterList; | ||
} | ||
|
||
/** | ||
* Filters the data with values from filterList | ||
* | ||
* @param \Magento\Framework\DataObject $params | ||
* @return $this | ||
*/ | ||
public function filter(\Magento\Framework\DataObject $params) | ||
{ | ||
foreach ($this->filterList as $filterKey) { | ||
/** @var string $filterKey */ | ||
if ($params->hasData($filterKey)) { | ||
$params->unsetData($filterKey); | ||
} | ||
} | ||
return $this; | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
app/code/Magento/Checkout/Model/Cart/RequestInfoFilterComposite.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,41 @@ | ||
<?php | ||
/** | ||
* | ||
* Copyright © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Checkout\Model\Cart; | ||
|
||
/** | ||
* Class RequestInfoFilterComposite | ||
*/ | ||
class RequestInfoFilterComposite implements RequestInfoFilterInterface | ||
{ | ||
/** | ||
* @var RequestInfoFilter[] $params | ||
*/ | ||
private $filters = []; | ||
|
||
/** | ||
* @param RequestInfoFilter[] $filters | ||
*/ | ||
public function __construct( | ||
$filters = [] | ||
) { | ||
$this->filters = $filters; | ||
} | ||
|
||
/** | ||
* Loops through all leafs of the composite and calls filter method | ||
* | ||
* @param \Magento\Framework\DataObject $params | ||
* @return $this | ||
*/ | ||
public function filter(\Magento\Framework\DataObject $params) | ||
{ | ||
foreach ($this->filters as $filter) { | ||
$filter->filter($params); | ||
} | ||
return $this; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/code/Magento/Checkout/Model/Cart/RequestInfoFilterInterface.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 © 2016 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Checkout\Model\Cart; | ||
|
||
/** | ||
* Interface RequestInfoFilterInterface used by composite and leafs to implement filtering | ||
*/ | ||
interface RequestInfoFilterInterface | ||
{ | ||
/** | ||
* Filters the data object by an array of parameters | ||
* | ||
* @param \Magento\Framework\DataObject $params | ||
* @return RequestInfoFilterInterface | ||
*/ | ||
public function filter(\Magento\Framework\DataObject $params); | ||
} |
Oops, something went wrong.