1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Cli\Command\ImportAttributesCommand |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import-cli-simple |
18
|
|
|
* @link http://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Cli\Command; |
22
|
|
|
|
23
|
|
|
use TechDivision\Import\Utils\EntityTypeCodes; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* The import command implementation. |
27
|
|
|
* |
28
|
|
|
* @author Tim Wagner <[email protected]> |
29
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
30
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
31
|
|
|
* @link https://github.com/techdivision/import-cli-simple |
32
|
|
|
* @link http://www.techdivision.com |
33
|
|
|
*/ |
34
|
|
|
class ImportAttributesCommand extends AbstractImportCommand |
35
|
|
|
{ |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* Configures the current command. |
39
|
|
|
* |
40
|
|
|
* @return void |
41
|
|
|
* @see \Symfony\Component\Console\Command\Command::configure() |
42
|
|
|
*/ |
43
|
|
|
protected function configure() |
44
|
|
|
{ |
45
|
|
|
|
46
|
|
|
// initialize the command with the required/optional options |
47
|
|
|
$this->setName('import:attributes') |
48
|
|
|
->setDescription('Imports attributes in the configured Magento 2 instance'); |
49
|
|
|
|
50
|
|
|
// invoke the parent method |
51
|
|
|
parent::configure(); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Return's the command's entity type code. |
56
|
|
|
* |
57
|
|
|
* @return string The command's entity type code |
58
|
|
|
*/ |
59
|
|
|
public function getEntityTypeCode() |
60
|
|
|
{ |
61
|
|
|
return EntityTypeCodes::EAV_ATTRIBUTE; |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
|