Skip to content

Commit e05df06

Browse files
authored
Merge pull request #8 from landofcoder/feature2-1
Feature2 1
2 parents cf09e13 + c3e5574 commit e05df06

File tree

11 files changed

+53
-56
lines changed

11 files changed

+53
-56
lines changed

Controller/Adminhtml/Tag/Index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class Index extends \Magento\Backend\App\Action
2727
{
2828

29-
protected $resultPageFactory;
29+
protected $resultPageFactory = false;
3030

3131
/**
3232
* Constructor
@@ -50,7 +50,7 @@ public function __construct(
5050
public function execute()
5151
{
5252
$resultPage = $this->resultPageFactory->create();
53-
$resultPage->getConfig()->getTitle()->prepend(__("Tag"));
53+
$resultPage->getConfig()->getTitle()->prepend(__("Tags"));
5454
return $resultPage;
5555
}
5656
}

Controller/Adminhtml/Tags/Index.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,10 @@
2020
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
* SOFTWARE.
2222
*/
23-
2423
namespace Lof\ProductTags\Controller\Adminhtml\Tags;
25-
2624
class Index extends \Magento\Backend\App\Action
2725
{
28-
2926
protected $resultPageFactory;
30-
3127
/**
3228
* Constructor
3329
*
@@ -41,7 +37,6 @@ public function __construct(
4137
$this->resultPageFactory = $resultPageFactory;
4238
parent::__construct($context);
4339
}
44-
4540
/**
4641
* Execute view action
4742
*
@@ -51,4 +46,4 @@ public function execute()
5146
{
5247
return $this->resultPageFactory->create();
5348
}
54-
}
49+
}

Controller/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ public function match(\Magento\Framework\App\RequestInterface $request)
3737
['request' => $request]
3838
);
3939
}
40-
}
40+
}

Controller/Tag/Index.php

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

etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" ?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
33
<menu>
4-
<add id="Lof_ProductTags::producttags" module="Lof_ProductTags" parent="Magento_Catalog::inventory" resource="Lof_ProductTags::lofproducttags" action="lofproducttags/tag/index" sortOrder="9999" title="Product Tags"/>
4+
<add id="Lof_ProductTags::producttags" module="Lof_ProductTags" parent="Magento_Catalog::inventory" resource="Magento_Backend::content" action="lof_producttags/tag/index" sortOrder="9999" title="Product Tags"/>
55
</menu>
66
</config>

etc/adminhtml/routes.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
<route frontName="lofproducttags" id="lofproducttags">
55
<module before="Magento_Backend" name="Lof_ProductTags"/>
66
</route>
7+
<route frontName="lof_producttags" id="lof_producttags">
8+
<module before="Magento_Backend" name="Lof_ProductTags"/>
9+
</route>
710
</router>
8-
</config>
11+
</config>

etc/adminhtml/system.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@
1818
<label>Route</label>
1919
<comment>This text will change your url.</comment>
2020
<depends>
21-
<field id ="enabled">1</field>
21+
<field id="enabled">1</field>
2222
</depends>
2323
</field>
2424
<field id="enable_tag_on_product" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
2525
<label>Enable tags block</label>
2626
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
2727
<comment>show/hide product tags on product detail page.</comment>
2828
<depends>
29-
<field id ="enabled">1</field>
29+
<field id="enabled">1</field>
3030
</depends>
3131
</field>
3232
<field id="product_tag_title" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
3333
<label>Product Tags Block Title</label>
3434
<depends>
35-
<field id ="enabled">1</field>
36-
<field id ="enable_tag_on_product">1</field>
35+
<field id="enabled">1</field>
36+
<field id="enable_tag_on_product">1</field>
3737
</depends>
3838
</field>
3939
<field id="number_tags" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
4040
<label>Limit tags to show</label>
4141
<depends>
42-
<field id ="enabled">1</field>
43-
<field id ="enable_tag_on_product">1</field>
42+
<field id="enabled">1</field>
43+
<field id="enable_tag_on_product">1</field>
4444
</depends>
4545
</field>
4646

@@ -49,25 +49,24 @@
4949
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
5050
<comment>show/hide product tags on sidebar position.</comment>
5151
<depends>
52-
<field id ="enabled">1</field>
52+
<field id="enabled">1</field>
5353
</depends>
5454
</field>
5555
<field id="tag_sidebar_title" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
5656
<label>Sidebar Tags Block Title</label>
5757
<depends>
58-
<field id ="enabled">1</field>
59-
<field id ="enable_tag_sidebar">1</field>
58+
<field id="enabled">1</field>
59+
<field id="enable_tag_sidebar">1</field>
6060
</depends>
6161
</field>
6262
<field id="number_tags_sidebar" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
6363
<label>Limit tags to show on sidebar</label>
6464
<depends>
65-
<field id ="enabled">1</field>
66-
<field id ="enable_tag_sidebar">1</field>
65+
<field id="enabled">1</field>
66+
<field id="enable_tag_sidebar">1</field>
6767
</depends>
6868
</field>
6969
</group>
70-
<!-- <resource>Lof_ProductTags::lof_producttags</resource> -->
7170
</section>
7271
</system>
7372
</config>

view/adminhtml/layout/lof_producttags_tag_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
<uiComponent name="lof_producttags_tag_listing"/>
77
</referenceContainer>
88
</body>
9-
</page>
9+
</page>

view/adminhtml/layout/lofproducttags_tags_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
<block class="Lof\ProductTags\Block\Adminhtml\Tags\Index" name="tags.index" template="Lof_ProductTags::tags/index.phtml"/>
66
</referenceContainer>
77
</body>
8-
</page>
8+
</page>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Hello tags/index.phtml
1+
hello Chinh'

0 commit comments

Comments
 (0)