Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StandardDeploy.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
22  private $packagePool;
23 
29  private $queue;
30 
37  public function __construct(
38  PackagePool $packagePool,
39  Queue $queue
40  ) {
41  $this->packagePool = $packagePool;
42  $this->queue = $queue;
43  }
44 
48  public function deploy(array $options)
49  {
50  $deployedPackages = [];
51  $packages = $this->packagePool->getPackagesForDeployment($options);
52  foreach ($packages as $package) {
54  if ($package->isVirtual()) {
55  // skip packages which can not be referenced directly from web ...
56  continue;
57  }
58  // ... and aggregate files from ancestors for others
59  $package->aggregate();
60  $deployedPackages[] = $package;
61  }
62 
63  foreach ($deployedPackages as $package) {
64  $this->queue->add($package);
65  }
66 
67  $this->queue->process();
68 
69  return $deployedPackages;
70  }
71 }
$queue
Definition: queue.php:21
__construct(PackagePool $packagePool, Queue $queue)