-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created version 1.5.13 of the Mollie plugin for Shopware 5
- Loading branch information
Reinder
committed
Jun 15, 2020
1 parent
7335fb6
commit 8397c28
Showing
13 changed files
with
261 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace MollieShopware\Components\Services; | ||
|
||
use Shopware\Components\Model\ModelManager; | ||
use Shopware\Models\Shop\Repository as ShopRepository; | ||
use Shopware\Models\Shop\Shop; | ||
|
||
class ShopService | ||
{ | ||
/** @var ModelManager */ | ||
private $modelManager; | ||
|
||
/** | ||
* Creates a new instance of the shop helper. | ||
* | ||
* @param ModelManager $modelManager | ||
*/ | ||
public function __construct( | ||
ModelManager $modelManager | ||
) | ||
{ | ||
$this->modelManager = $modelManager; | ||
} | ||
|
||
/** | ||
* Returns a shop by it's id. | ||
* | ||
* @param int $id | ||
* @return Shop|object|null | ||
*/ | ||
public function shopById($id) | ||
{ | ||
/** @var ShopRepository $shopRepo */ | ||
$shopRepo = $this->modelManager->getRepository(Shop::class); | ||
|
||
/** @var Shop $shop */ | ||
return $shopRepo->findOneBy([ | ||
'id' => $id | ||
]); | ||
} | ||
} |
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
Oops, something went wrong.