Skip to content

Commit 4ec6ecf

Browse files
committed
Code refactor
1 parent 2c49169 commit 4ec6ecf

File tree

15 files changed

+186
-66
lines changed

15 files changed

+186
-66
lines changed

Block/Adminhtml/ConflictList.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Copyright © Magefan ([email protected]). All rights reserved.
4-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
55
*
66
* Glory to Ukraine! Glory to the heroes!
77
*/
@@ -225,4 +225,16 @@ protected function sortConflicts($a, $b)
225225
{
226226
return $a['status'] <= $b['status'];
227227
}
228+
229+
/**
230+
* @return bool
231+
*/
232+
final public function isEnabled()
233+
{
234+
return (bool)$this->objectManager->get(\Magento\Framework\App\Config\ScopeConfigInterface::class)
235+
->getValue(
236+
'mfconflictdetector/general/enabled',
237+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
238+
);
239+
}
228240
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
/**
3+
* Copyright © Magefan ([email protected]). All rights reserved.
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
5+
*
6+
* Glory to Ukraine! Glory to the heroes!
7+
*/
8+
9+
namespace Magefan\ConflictDetector\Block\Adminhtml\System\Config\Form;
10+
11+
use Magento\Store\Model\ScopeInterface;
12+
13+
/**
14+
* Admin blog configurations information block
15+
*/
16+
class Info extends \Magefan\Community\Block\Adminhtml\System\Config\Form\Info
17+
{
18+
/**
19+
* Return extension url
20+
* @return string
21+
*/
22+
protected function getModuleUrl()
23+
{
24+
return 'https://mage' . 'fan.com?utm_source=m2admin_blog_config&utm_medium=link&utm_campaign=regular';
25+
}
26+
27+
/**
28+
* Return extension title
29+
* @return string
30+
*/
31+
protected function getModuleTitle()
32+
{
33+
return 'Conflict Detector Extension';
34+
}
35+
}

Controller/Adminhtml/Index/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Copyright © Magefan ([email protected]). All rights reserved.
4-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
55
*
66
* Glory to Ukraine! Glory to the heroes!
77
*/

LICENSE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement)

Model/Config/Reader/Dom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Copyright © Magefan ([email protected]). All rights reserved.
4-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
4+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
55
*
66
* Glory to Ukraine! Glory to the heroes!
77
*/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ There isn't a way for us to reply to reviews and the Q&A moderation is very slow
2828

2929

3030
## License
31-
The code is licensed under [Open Software License ("OSL") v. 3.0](http://opensource.org/licenses/osl-3.0.php).
31+
The code is licensed under [EULA](https://magefan.com/end-user-license-agreement).
3232

3333
## Other Magefan Extensions That Can Be Installed Via Composer
3434
## Other [Magento 2 Extensions](https://magefan.com/magento2-extensions) by Magefan

composer.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
"name": "magefan/module-conflict-detector",
33
"description": "Detect extension conflicts",
44
"require": {
5-
"magefan/module-community" : ">=2.0.13"
5+
"magefan/module-community" : ">=2.1.6"
66
},
77
"type": "magento2-module",
8-
"version": "2.0.5",
9-
"license": [
10-
"OSL-3.0",
11-
"AFL-3.0"
12-
],
8+
"version": "2.1.0",
139
"autoload": {
1410
"files": [ "registration.php" ],
1511
"psr-4": {

etc/acl.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
/**
44
* Copyright © Magefan ([email protected]). All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
66
*
77
* Glory to Ukraine! Glory to the heroes!
88
*/
@@ -16,6 +16,13 @@
1616
<resource id="Magefan_ConflictDetector::elements" title="Conflict Detector" translate="title" sortOrder="50" />
1717
</resource>
1818
</resource>
19+
<resource id="Magento_Backend::stores">
20+
<resource id="Magento_Backend::stores_settings">
21+
<resource id="Magento_Config::config">
22+
<resource id="Magefan_ConflictDetector::config" title="Conflict Detector Section" />
23+
</resource>
24+
</resource>
25+
</resource>
1926
</resource>
2027
</resources>
2128
</acl>

etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
/**
44
* Copyright © Magefan ([email protected]). All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
66
*
77
* Glory to Ukraine! Glory to the heroes!
88
*/

etc/adminhtml/routes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
/**
44
* Copyright © Magefan ([email protected]). All rights reserved.
5-
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5+
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
66
*
77
* Glory to Ukraine! Glory to the heroes!
88
*/
@@ -13,4 +13,4 @@
1313
<module name="Magefan_ConflictDetector" />
1414
</route>
1515
</router>
16-
</config>
16+
</config>

0 commit comments

Comments
 (0)