forked from Sylius/Sylius
-
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.
- Loading branch information
Paweł Jędrzejewski
committed
Nov 19, 2014
1 parent
0a34869
commit 4f58bb9
Showing
2 changed files
with
34 additions
and
0 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
33 changes: 33 additions & 0 deletions
33
src/Sylius/Component/Core/Pricing/ChannelBasedCalculator.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,33 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Sylius\Component\Core\Pricing; | ||
|
||
use Sylius\Component\Pricing\Calculator\CalculatorInterface; | ||
|
||
/** | ||
* Channel based calculator. | ||
* | ||
* @author Paweł Jędrzejewski <pawel@sylius.org> | ||
*/ | ||
class GroupBasedCalculator extends AbstractCalculator implements CalculatorInterface | ||
{ | ||
protected $parameterName = 'channel'; | ||
protected $className = 'Sylius\Component\Core\Model\ChannelInterface'; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getType() | ||
{ | ||
return Calculators::GROUP_BASED; | ||
} | ||
} |