Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento-composer-installer
src
MagentoHackathon
Composer
Magento
Command
DeployCommand.php
Go to the documentation of this file.
1
<?php
2
7
namespace
MagentoHackathon\Composer\Magento\Command
;
8
9
use
MagentoHackathon\Composer\Magento\Deploy\Manager\Entry
;
10
use
MagentoHackathon\Composer\Magento\DeployManager
;
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Input\InputOption;
13
use Symfony\Component\Console\Output\OutputInterface;
14
use Composer\Downloader\VcsDownloader;
15
use
MagentoHackathon\Composer\Magento\Installer
;
16
21
class
DeployCommand
extends
\Composer\Command\Command
22
{
23
protected
function
configure
()
24
{
25
$this
26
->setName(
'magento-module-deploy'
)
27
->setDescription(
'Deploy all Magento modules loaded via composer.json'
)
28
->setDefinition(array(
29
// we dont need to define verbose, because composer already defined it internal
30
//new InputOption('verbose', 'v', InputOption::VALUE_NONE, 'Show modified files for each directory that contains changes.'),
31
))
32
->setHelp(<<<EOT
33
This command deploys all magento Modules
34
35
EOT
36
)
37
;
38
}
39
40
protected
function
execute(InputInterface $input, OutputInterface
$output
)
41
{
42
// init repos
43
$composer = $this->getComposer();
44
$installedRepo = $composer->getRepositoryManager()->getLocalRepository();
45
46
$dm = $composer->getDownloadManager();
47
$im = $composer->getInstallationManager();
48
52
$moduleInstaller = $im->getInstaller(
"magento-module"
);
53
54
55
$deployManager =
new
DeployManager
( $this->getIO() );
56
57
$extra
= $composer->getPackage()->getExtra();
58
$sortPriority = isset(
$extra
[
'magento-deploy-sort-priority'
]) ?
$extra
[
'magento-deploy-sort-priority'
] : array();
59
$deployManager->setSortPriority( $sortPriority );
60
61
62
63
$moduleInstaller->setDeployManager( $deployManager );
64
65
66
foreach
($installedRepo->getPackages() as $package) {
67
68
if
($input->getOption(
'verbose'
)) {
69
$output
->writeln( $package->getName() );
70
$output
->writeln( $package->getType() );
71
}
72
73
if
( $package->getType() !=
"magento-module"
){
74
continue
;
75
}
76
if
($input->getOption(
'verbose'
)) {
77
$output
->writeln(
"package {$package->getName()} recognized"
);
78
}
79
80
$strategy = $moduleInstaller->getDeployStrategy($package);
81
if
($input->getOption(
'verbose'
)) {
82
$output
->writeln(
"used "
. get_class($strategy) .
" as deploy strategy"
);
83
}
84
$strategy->setMappings($moduleInstaller->getParser($package)->getMappings());
85
86
$deployManagerEntry =
new
Entry();
87
$deployManagerEntry->setPackageName($package->getName());
88
$deployManagerEntry->setDeployStrategy($strategy);
89
$deployManager->addPackage($deployManagerEntry);
90
91
}
92
93
$deployManager->doDeploy();
94
95
return
;
96
}
97
}
MagentoHackathon\Composer\Magento\Installer
Definition:
Installer.php:22
MagentoHackathon\Composer\Magento\Deploy\Manager\Entry
Definition:
Entry.php:12
MagentoHackathon\Composer\Magento\DeployManager
Definition:
DeployManager.php:16
$output
$output
Definition:
classmap_generator.php:100
MagentoHackathon\Composer\Magento\Command
Definition:
DeployCommand.php:7
MagentoHackathon\Composer\Magento\Command\DeployCommand\configure
configure()
Definition:
DeployCommand.php:23
MagentoHackathon\Composer\Magento\Command\DeployCommand
Definition:
DeployCommand.php:21
$extra
if( $_orders &&count( $_orders))( 'Orders') ?></caption >< thead >< tr >< th scopeforeach( $_orders as $_order)(__( 'Order #')) ?>" class $extra
Definition:
history.phtml:32