Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigCondition.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
20  const NAME = 'ifconfig';
21 
25  protected $scopeConfig;
26 
30  protected $scopeResolver;
31 
35  private $scopeType;
36 
44  public function __construct(
47  $scopeType = null
48  ) {
49  $this->scopeType = $scopeType;
50  $this->scopeConfig = $scopeConfig;
51  $this->scopeResolver = $scopeResolver;
52  }
53 
57  public function isVisible(array $arguments)
58  {
59  return $this->scopeConfig->isSetFlag(
60  $arguments['configPath'],
61  $this->scopeType,
62  $this->scopeResolver->getScope()
63  );
64  }
65 
69  public function getName()
70  {
71  return self::NAME;
72  }
73 }
__construct(ScopeConfigInterface $scopeConfig, ScopeResolverInterface $scopeResolver, $scopeType=null)
$arguments