Definition at line 13 of file DatabaseCheck.php.
◆ __construct()
__construct |
( |
DbValidator |
$dbValidator | ) |
|
Constructor
- Parameters
-
Definition at line 25 of file DatabaseCheck.php.
27 $this->dbValidator = $dbValidator;
◆ indexAction()
Result of checking DB credentials
- Returns
- JsonModel
Definition at line 35 of file DatabaseCheck.php.
38 $params = Json::decode($this->getRequest()->getContent(), Json::TYPE_ARRAY);
40 $this->dbValidator->checkDatabaseConnection(
$params[
'name'],
$params[
'host'],
$params[
'user'], $password);
41 $tablePrefix = isset(
$params[
'tablePrefix']) ?
$params[
'tablePrefix'] :
'';
42 $this->dbValidator->checkDatabaseTablePrefix($tablePrefix);
43 return new JsonModel([
'success' =>
true]);
44 }
catch (\Exception $e) {
45 return new JsonModel([
'success' =>
false,
'error' => $e->getMessage()]);
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
The documentation for this class was generated from the following file: