-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix media upload, Rewrite some module parts, Change License, update f…
…ile composer.json
- Loading branch information
Danilo Argentiero
committed
Mar 27, 2019
1 parent
a4c728b
commit f481661
Showing
24 changed files
with
311 additions
and
608 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
.idea |
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 |
---|---|---|
@@ -1,23 +1,11 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MSP\CmsImportExport\Api; | ||
|
||
/** | ||
|
@@ -39,85 +27,85 @@ interface ContentInterface | |
* @param $mode | ||
* @return ContentInterface | ||
*/ | ||
public function setCmsMode($mode); | ||
public function setCmsMode($mode): ContentInterface; | ||
|
||
/** | ||
* Set media mode on import | ||
* @param $mode | ||
* @return ContentInterface | ||
*/ | ||
public function setMediaMode($mode); | ||
public function setMediaMode($mode): ContentInterface; | ||
|
||
/** | ||
* Set stores mapping on import | ||
* @param array $storesMap | ||
* @return ContentInterface | ||
*/ | ||
public function setStoresMap(array $storesMap); | ||
public function setStoresMap(array $storesMap): ContentInterface; | ||
|
||
/** | ||
* Return CMS block to array | ||
* @param \Magento\Cms\Api\Data\BlockInterface $blockInterface | ||
* @return array | ||
*/ | ||
public function blockToArray(\Magento\Cms\Api\Data\BlockInterface $blockInterface); | ||
public function blockToArray(\Magento\Cms\Api\Data\BlockInterface $blockInterface): array ; | ||
|
||
/** | ||
* Return CMS page to array | ||
* @param \Magento\Cms\Api\Data\PageInterface $pageInterface | ||
* @return array | ||
*/ | ||
public function pageToArray(\Magento\Cms\Api\Data\PageInterface $pageInterface); | ||
public function pageToArray(\Magento\Cms\Api\Data\PageInterface $pageInterface): array; | ||
|
||
/** | ||
* Return CMS blocks as array | ||
* @param \Magento\Cms\Api\Data\BlockInterface[] $blockInterfaces | ||
* @return array | ||
*/ | ||
public function blocksToArray(array $blockInterfaces); | ||
public function blocksToArray(array $blockInterfaces): array; | ||
|
||
/** | ||
* Return CMS pages as array | ||
* @param \Magento\Cms\Api\Data\PageInterface[] $pageInterfaces | ||
* @return array | ||
*/ | ||
public function pagesToArray(array $pageInterfaces); | ||
public function pagesToArray(array $pageInterfaces): array; | ||
|
||
/** | ||
* Create a zip file and return its name | ||
* @param \Magento\Cms\Api\Data\PageInterface[] $pageInterfaces | ||
* @param \Magento\Cms\Api\Data\BlockInterface[] $blockInterfaces | ||
* @return string | ||
*/ | ||
public function asZipFile(array $pageInterfaces, array $blockInterfaces); | ||
public function asZipFile(array $pageInterfaces, array $blockInterfaces): string; | ||
|
||
/** | ||
* Import a single page from an array and return false on error and true on success | ||
* @param array $pageData | ||
* @return bool | ||
*/ | ||
public function importPageFromArray(array $pageData); | ||
public function importPageFromArray(array $pageData): bool; | ||
|
||
/** | ||
* Import a single block from an array and return false on error and true on success | ||
* @param array $blockData | ||
* @return bool | ||
*/ | ||
public function importBlockFromArray(array $blockData); | ||
public function importBlockFromArray(array $blockData): bool; | ||
|
||
/** | ||
* Import contents from array and return number of imported records (-1 on error) | ||
* @param array $payload | ||
* @param string $archivePath = null | ||
* @return int | ||
*/ | ||
public function importFromArray(array $payload, $archivePath = null); | ||
public function importFromArray(array $payload, $archivePath = null): int; | ||
|
||
/** | ||
* Import contents from zip archive and return number of imported records (-1 on error) | ||
* @param string $fileName | ||
* @param bool $rm = true | ||
* @return int | ||
*/ | ||
public function importFromZipFile($fileName, $rm = false); | ||
public function importFromZipFile($fileName, $rm = false): int; | ||
} |
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Block\Adminhtml; | ||
|
@@ -38,7 +24,7 @@ protected function _construct() | |
$this->buttonList->update('save', 'label', __('Import')); | ||
} | ||
|
||
public function getHeaderText() | ||
public function getHeaderText(): string | ||
{ | ||
return __('Import CMS'); | ||
} | ||
|
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Block\Adminhtml\Import\Upload; | ||
|
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,5 @@ | ||
Copyright © 2018-present Skeeller srl - MageSpecialist. | ||
|
||
Each source file included in this module is licensed under OSL 3.0 . | ||
|
||
http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0). |
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Command; | ||
|
@@ -29,7 +15,9 @@ | |
|
||
class ImportPage extends Command | ||
{ | ||
|
||
protected $pageInterface; | ||
|
||
/** | ||
* @var ObjectManagerInterface | ||
*/ | ||
|
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Controller\Adminhtml\Block; | ||
|
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Controller\Adminhtml\Import; | ||
|
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Controller\Adminhtml\Import; | ||
|
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 |
---|---|---|
@@ -1,21 +1,7 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_CmsImportExport | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
* Copyright © MageSpecialist - Skeeller srl. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace MSP\CmsImportExport\Controller\Adminhtml\Page; | ||
|
Oops, something went wrong.