Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
BaseUrlConfigPlugin.php
Go to the documentation of this file.
1 <?php
7 
12 
17 {
21  private $subscriptionUpdateHandler;
22 
26  public function __construct(
27  SubscriptionUpdateHandler $subscriptionUpdateHandler
28  ) {
29  $this->subscriptionUpdateHandler = $subscriptionUpdateHandler;
30  }
31 
40  public function afterAfterSave(
41  Value $subject,
43  ) {
44  if ($this->isPluginApplicable($result)) {
45  $this->subscriptionUpdateHandler->processUrlUpdate($result->getOldValue());
46  }
47 
48  return $result;
49  }
50 
55  private function isPluginApplicable(Value $result)
56  {
57  return $result->isValueChanged()
58  && ($result->getPath() === Store::XML_PATH_SECURE_BASE_URL)
60  }
61 }
__construct(SubscriptionUpdateHandler $subscriptionUpdateHandler)
const XML_PATH_SECURE_BASE_URL
Definition: Store.php:68