Skip to content

Commit c811be6

Browse files
committed
create new Community module
1 parent 8c06dfd commit c811be6

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

Model/AdminNotificationFeed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Class AdminNotificationFeedextends
1414
* @package Magefan\Community\Model
1515
*/
16-
class AdminNotificationFeedextends extends \Magento\AdminNotification\Model\Feed
16+
class AdminNotificationFeed extends \Magento\AdminNotification\Model\Feed
1717
{
1818
/**
1919
* @var \Magento\Backend\Model\Auth\Session

Observer/PredispathAdminActionControllerObserver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PredispathAdminActionControllerObserver implements ObserverInterface
3535
* @param \Magefan\Blog\Model\Comment\Notification $commentNotification,
3636
*/
3737
public function __construct(
38-
\Magefan\Blog\Model\AdminNotificationFeedFactory $feedFactory,
38+
\Magefan\Community\Model\AdminNotificationFeedFactory $feedFactory,
3939
\Magento\Backend\Model\Auth\Session $backendAuthSession,
4040
\Magefan\Blog\Model\Comment\Notification $commentNotification
4141
) {
@@ -54,10 +54,10 @@ public function __construct(
5454
public function execute(\Magento\Framework\Event\Observer $observer)
5555
{
5656
if ($this->_backendAuthSession->isLoggedIn()) {
57+
5758
$feedModel = $this->_feedFactory->create();
58-
/* @var $feedModel \Magefan\Blog\Model\AdminNotificationFeed */
59+
/* @var $feedModel \Magefan\Community\Model\AdminNotificationFeed */
5960
$feedModel->checkUpdate();
60-
6161
/** Check pending blog comments */
6262
$this->commentNotification->checkComments();
6363
}

etc/adminhtml/events.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
99
<event name="controller_action_predispatch">
10-
<observer name="magefan_blog_controller_action_predispatch" instance="Magefan\Blog\Observer\PredispathAdminActionControllerObserver" />
11-
</event>
12-
<event name="controller_action_postdispatch_blog_post_save">
13-
<observer name="magefan_blog_invalidate_cache" instance="Magefan\Blog\Observer\InvalidateCache" />
14-
</event>
15-
<event name="controller_action_postdispatch_blog_category_save">
16-
<observer name="magefan_blog_invalidate_cache" instance="Magefan\Blog\Observer\InvalidateCache" />
10+
<observer name="magefan_community_controller_action_predispatch" instance="Magefan\Community\Observer\PredispathAdminActionControllerObserver" />
1711
</event>
1812
</config>

etc/routes.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)