Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PredispatchAdminActionControllerObserver.php
Go to the documentation of this file.
1 <?php
7 
9 
16 {
20  protected $_feedFactory;
21 
26 
31  public function __construct(
32  \Magento\AdminNotification\Model\FeedFactory $feedFactory,
33  \Magento\Backend\Model\Auth\Session $backendAuthSession
34  ) {
35  $this->_feedFactory = $feedFactory;
36  $this->_backendAuthSession = $backendAuthSession;
37  }
38 
46  public function execute(\Magento\Framework\Event\Observer $observer)
47  {
48  if ($this->_backendAuthSession->isLoggedIn()) {
49  $feedModel = $this->_feedFactory->create();
50  /* @var $feedModel \Magento\AdminNotification\Model\Feed */
51  $feedModel->checkUpdate();
52  }
53  }
54 }
__construct(\Magento\AdminNotification\Model\FeedFactory $feedFactory, \Magento\Backend\Model\Auth\Session $backendAuthSession)