Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
NotificationHandler.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Mtf\Config\DataInterface;
14 
19 {
23  private $configuration;
24 
30  public function __construct(DataInterface $configuration)
31  {
32  $this->configuration = $configuration;
33  }
34 
43  public function execute(AbstractState $state)
44  {
45  $url = $_ENV['app_backend_url'] . 'admin/releaseNotification/notification/markUserNotified/?isAjax=true';
46  $curl = new BackendDecorator(new CurlTransport(), $this->configuration);
47  $curl->write($url, []);
48  $response = json_decode($curl->read(), true);
49  $curl->close();
50  if (isset($response['success'])) {
51  return $response['success'];
52  }
53  return false;
54  }
55 }
$response
Definition: 404.php:11
$configuration
Definition: index.php:33