Feed.php 798 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Smartwave\Core\Model;
  3. class Feed extends \Magento\AdminNotification\Model\Feed
  4. {
  5. const SMARTWAVE_FEED_URL = 'www.portotheme.com/envato/porto2_notifications.rss';
  6. public function getFeedUrl()
  7. {
  8. $httpPath = $this->_backendConfig->isSetFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
  9. if ($this->_feedUrl === null) {
  10. $this->_feedUrl = $httpPath . self::SMARTWAVE_FEED_URL;
  11. }
  12. return $this->_feedUrl;
  13. }
  14. public function getLastUpdate()
  15. {
  16. return $this->_cacheManager->load('smartwave_notifications_lastcheck');
  17. }
  18. public function setLastUpdate()
  19. {
  20. $this->_cacheManager->save(time(), 'smartwave_notifications_lastcheck');
  21. return $this;
  22. }
  23. }