Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
bbd005c8
Commit
bbd005c8
authored
3 years ago
by
Julien Jorry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PageAdmin : add URL to list of pages
parent
4de17b1a
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
PageAdmin.php
src/Admin/PageAdmin.php
+4
-4
Page.php
src/Entity/Page.php
+5
-0
No files found.
src/Admin/PageAdmin.php
View file @
bbd005c8
...
...
@@ -112,10 +112,10 @@ class PageAdmin extends AbstractAdmin
$listMapper
->
addIdentifier
(
'user'
,
null
,
[
'label'
=>
'Auteur'
])
->
addIdentifier
(
'name'
,
null
,
[
'label'
=>
'Titre'
])
// ->add('enabled', null, array(
// 'label' => 'Activé',
// 'editable' => true
// )
)
->
addIdentifier
(
'url'
,
null
,
[
'label'
=>
'Url'
])
->
add
(
'_action'
,
null
,
[
'actions'
=>
[
'edit'
=>
[]],
]
)
;
}
...
...
This diff is collapsed.
Click to expand it.
src/Entity/Page.php
View file @
bbd005c8
...
...
@@ -199,6 +199,11 @@ class Page
return
$this
;
}
public
function
getUrl
()
:
string
{
return
'/page/'
.
$this
->
getSlug
();
}
public
function
__toString
()
:
string
{
return
$this
->
getName
()
?
$this
->
getName
()
:
'Page'
;
...
...
This diff is collapsed.
Click to expand it.
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