Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
joshine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
joshine
Commits
75a65453
Commit
75a65453
authored
Feb 15, 2023
by
wd
Committed by
halweg
Feb 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限添加
parent
3eb3a243
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
app/code/Joshine/Banner/Controller/Index/Index.php
+10
-2
app/code/Joshine/Banner/etc/acl.xml
+13
-11
No files found.
app/code/Joshine/Banner/Controller/Index/Index.php
View file @
75a65453
<?php
namespace
Joshine\Banner\Controller\Index
;
use
Magento\Framework\App\Action\Context
;
use
Magento\Framework\View\Result\PageFactory
;
use
Joshine\Banner\Model\BassFactory
;
class
Index
extends
\Magento\Framework\App\Action\Action
{
const
ADMIN_RESOURCE
=
'Joshine_Banner::index'
;
protected
$_pageFactory
;
protected
$_bassFactory
;
public
function
__construct
(
Context
$context
,
PageFactory
$pageFactory
,
BassFactory
$bassFactory
)
{
$this
->
_bassFactory
=
$bassFactory
;
...
...
@@ -19,8 +25,10 @@ class Index extends \Magento\Framework\App\Action\Action{
public
function
execute
()
{
// TODO: Implement execute() method.
return
$this
->
_pageFactory
->
create
();
$resultPage
=
$this
->
_pageFactory
->
create
();
$resultPage
->
setActiveMenu
(
'Joshine_Banner::index'
);
$resultPage
->
getConfig
()
->
getTitle
()
->
prepend
((
__
(
'Banner'
)));
return
$resultPage
;
}
...
...
app/code/Joshine/Banner/etc/acl.xml
View file @
75a65453
<?xml version="1.0" ?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Acl/etc/acl.xsd"
>
<acl>
<resources>
<resource
id=
"Magento_Backend::admin"
>
<resource
id=
"Magento_Backend::joshine"
title=
"Jpshone"
sortOrder=
"40"
>
<resource
id=
"Magento_Backend::Joshine_banner"
title=
"Banner"
sortOrder=
"10"
>
<resource
id=
"Joshine_Banner::index"
title=
"Index"
sortOrder=
"10"
></resource>
<?xml version="1.0"?>
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Acl/etc/acl.xsd"
>
<acl>
<resources>
<resource
id=
"Magento_Backend::admin"
>
<resource
id=
"Magento_Backend::joshine"
title=
"Joshine"
sortOrder=
"40"
>
<resource
id=
"Magento_Backend::joshine_banner"
title=
"Banner"
sortOrder=
"10"
>
<resource
id=
"Joshine_Banner::index"
title=
"Index"
sortOrder=
"10"
/>
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</resources>
</acl>
</config>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment