Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ScopeFactory.php
Go to the documentation of this file.
1 <?php
8 
10 
15 {
19  private $objectManager;
20 
26  public function __construct(
27  ObjectManagerInterface $objectManager
28  ) {
29  $this->objectManager = $objectManager;
30  }
31 
38  public function create($identifier, $value, $fallback = null)
39  {
40  return $this->objectManager->create(
41  ScopeInterface::class,
42  [
43  'identifier' => $identifier,
44  'value' => $value,
45  'fallback' => $fallback
46  ]
47  );
48  }
49 }
$objectManager
Definition: bootstrap.php:17
create($identifier, $value, $fallback=null)
$value
Definition: gender.phtml:16
__construct(ObjectManagerInterface $objectManager)