-
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 pull request #556 from magento-south/merchant_beta
[MERCHANT_BETA][SOUTH+TROLL] Create a customer on the frontend, open customer acct in admin, receive error message
- Loading branch information
Showing
19 changed files
with
172 additions
and
79 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
30 changes: 30 additions & 0 deletions
30
app/code/Magento/CatalogImportExport/Model/Import/ContextInterface.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,30 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\CatalogImportExport\Model\Import; | ||
|
||
/** | ||
* Interface ContextInterface | ||
* @package Magento\CatalogImportExport\Model\Import | ||
*/ | ||
interface ContextInterface | ||
{ | ||
/** | ||
* Get context params | ||
* | ||
* @return array|null | ||
*/ | ||
public function getParams(); | ||
|
||
/** | ||
* Get context param by name | ||
* | ||
* @param string $name | ||
* | ||
* @return mixed | ||
*/ | ||
public function getParam($name); | ||
} |
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
54 changes: 54 additions & 0 deletions
54
...de/Magento/CatalogImportExport/Model/Import/Product/Validator/AbstractImportValidator.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,54 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\CatalogImportExport\Model\Import\Product\Validator; | ||
|
||
use Magento\Framework\Exception\State\InitException; | ||
use Magento\Framework\Validator\AbstractValidator; | ||
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface; | ||
use Magento\CatalogImportExport\Model\Import\ContextInterface; | ||
|
||
abstract class AbstractImportValidator extends AbstractValidator implements RowValidatorInterface | ||
{ | ||
/** | ||
* @var \Magento\CatalogImportExport\Model\Import\Product | ||
*/ | ||
protected $context; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function init() | ||
{ | ||
return $this; | ||
} | ||
|
||
/** | ||
* Set context object | ||
* | ||
* @param ContextInterface $context | ||
* | ||
* @return $this | ||
*/ | ||
public function setContext(ContextInterface $context) | ||
{ | ||
$this->context = $context; | ||
return $this; | ||
} | ||
|
||
/** | ||
* Get context object | ||
* | ||
* @return ContextInterface | ||
* @throws InitException | ||
*/ | ||
public function getContext() | ||
{ | ||
if (!$this->context instanceof ContextInterface) { | ||
throw new InitException(__('Validation context is not initialized.')); | ||
} | ||
return $this->context; | ||
} | ||
} |
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.