Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ProjectConfig.php
Go to the documentation of this file.
1 <?php
10 
11 
13 
14  protected $libraryPath;
15  protected $libraryPackages;
16 
17  public function __construct( $extra )
18  {
20  if( isset($extra['magento-project']) ){
21  $this->applyMagentoConfig($extra['magento-project']);
22  }
23  }
24 
25  protected function fetchVarFromConfigArray( $array, $key, $default=null ){
26  $result = $default;
27  if( isset($array[$key]) ){
28  $result = $array[$key];
29  }
30  return $result;
31  }
32 
33  protected function applyDeprecatedRootConfigs( $rootConfig )
34  {
35 
36  }
37 
38  protected function applyMagentoConfig( $config )
39  {
40  $this->libraryPath = $this->fetchVarFromConfigArray( $config, 'libraryPath');
41  $this->libraryPackages = $this->fetchVarFromConfigArray( $config, 'libraries');
42 
43  }
44 
45  public function getLibraryPath()
46  {
47  return $this->libraryPath;
48  }
49 
50  public function getLibraryConfigByPackagename( $packagename )
51  {
52  return $this->fetchVarFromConfigArray( $this->libraryPackages, $packagename );
53  }
54 
55 
56 
57 
58 }
$config
Definition: fraud_order.php:17
fetchVarFromConfigArray( $array, $key, $default=null)
if( $_orders &&count( $_orders))( 'Orders') ?></caption >< thead >< tr >< th scopeforeach( $_orders as $_order)(__( 'Order #')) ?>" class $extra
Definition: history.phtml:32