widget.modx-news.php 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * This file is part of MODX Revolution.
  4. *
  5. * Copyright (c) MODX, LLC. All Rights Reserved.
  6. *
  7. * For complete copyright and license information, see the COPYRIGHT and LICENSE
  8. * files found in the top-level directory of this distribution.
  9. */
  10. /*
  11. * This file is part of MODX Revolution.
  12. *
  13. * Copyright (c) MODX, LLC. All Rights Reserved.
  14. *
  15. * For complete copyright and license information, see the COPYRIGHT and LICENSE
  16. * files found in the top-level directory of this distribution.
  17. */
  18. class modDashboardWidgetNewsFeed extends modDashboardWidgetInterface {
  19. /**
  20. * @return string
  21. */
  22. public function render() {
  23. $enabled = $this->modx->getOption('feed_modx_news_enabled',null,true);
  24. if (!$enabled) {
  25. return '';
  26. }
  27. return '<div id="modx-news-feed-container" class="feed-loading" data-feed="news"><i class="icon icon-refresh icon-spin" aria-hidden="true"></i> ' . $this->modx->lexicon('loading') . '</div>';
  28. }
  29. }
  30. return 'modDashboardWidgetNewsFeed';