-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from logeecom/feature/crset-25
Release v1.0.1
- Loading branch information
Showing
10 changed files
with
92 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
use Packlink\BusinessLogic\Country\CountryService; | ||
use Packlink\Infrastructure\ServiceRegister; | ||
use Packlink\Controllers\Common\CanInstantiateServices; | ||
use Packlink\Utilities\Translation; | ||
use Packlink\Utilities\Response; | ||
|
||
class Shopware_Controllers_Backend_PacklinkRegistration extends Enlight_Controller_Action | ||
{ | ||
use CanInstantiateServices; | ||
|
||
/** | ||
* Returns countries supported by Packlink. | ||
*/ | ||
public function getCountriesAction() | ||
{ | ||
/** @var \Packlink\BusinessLogic\Country\CountryService $countryService */ | ||
$countryService = ServiceRegister::getService(CountryService::CLASS_NAME); | ||
$supportedCountries = $countryService->getSupportedCountries(); | ||
|
||
foreach ($supportedCountries as $country) { | ||
$country->registrationLink = str_replace('shopware', 'pro', $country->registrationLink); | ||
$country->name = Translation::get("configuration/country/{$country->code}"); | ||
} | ||
|
||
Response::dtoEntitiesResponse($supportedCountries); | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
Empty file.